mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 01:02:58 +00:00
Fix source toggle, fix way drawing
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
|
||||
id.ui()(document.getElementById('id-container'));
|
||||
|
||||
d3.select('#about-list').insert('li', '.user-list')
|
||||
iD.d3.select('#about-list').insert('li', '.user-list')
|
||||
.attr('class', 'source-switch')
|
||||
.call(iD.ui.SourceSwitch(id)
|
||||
.keys([
|
||||
|
||||
@@ -4,13 +4,13 @@ import { Browse } from '../modes/index';
|
||||
import { Draw } from './draw';
|
||||
|
||||
export function AddWay(context) {
|
||||
var event = d3.dispatch('start', 'startFromWay', 'startFromNode'),
|
||||
var dispatch = d3.dispatch('start', 'startFromWay', 'startFromNode'),
|
||||
draw = Draw(context);
|
||||
|
||||
var addWay = function(surface) {
|
||||
draw.on('click', event.start)
|
||||
.on('clickWay', event.startFromWay)
|
||||
.on('clickNode', event.startFromNode)
|
||||
draw.on('click', function() { dispatch.apply('start', this, arguments); })
|
||||
.on('clickWay', function() { dispatch.apply('startFromWay', this, arguments); })
|
||||
.on('clickNode', function() { dispatch.apply('startFromNode', this, arguments); })
|
||||
.on('cancel', addWay.cancel)
|
||||
.on('finish', addWay.cancel);
|
||||
|
||||
@@ -37,5 +37,5 @@ export function AddWay(context) {
|
||||
return addWay;
|
||||
};
|
||||
|
||||
return rebind(addWay, event, 'on');
|
||||
return rebind(addWay, dispatch, 'on');
|
||||
}
|
||||
|
||||
@@ -36,8 +36,10 @@ export { TileLayer } from './renderer/tile_layer';
|
||||
import * as data from '../data/index.js';
|
||||
|
||||
export var debug = false;
|
||||
import * as d3 from 'd3';
|
||||
|
||||
export {
|
||||
d3,
|
||||
data,
|
||||
actions,
|
||||
geo,
|
||||
|
||||
Reference in New Issue
Block a user