mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-17 22:24:49 +02:00
Don't need a separate 'select' event
This commit is contained in:
+1
-6
@@ -17,7 +17,7 @@ window.iD = function () {
|
||||
};
|
||||
|
||||
var history = iD.History(context),
|
||||
dispatch = d3.dispatch('enter', 'exit', 'select', 'toggleFullscreen'),
|
||||
dispatch = d3.dispatch('enter', 'exit', 'toggleFullscreen'),
|
||||
mode,
|
||||
container,
|
||||
ui = iD.ui(context),
|
||||
@@ -100,8 +100,6 @@ window.iD = function () {
|
||||
|
||||
/* Modes */
|
||||
context.enter = function(newMode) {
|
||||
var s0 = context.selectedIDs();
|
||||
|
||||
if (mode) {
|
||||
mode.exit();
|
||||
dispatch.exit(mode);
|
||||
@@ -110,9 +108,6 @@ window.iD = function () {
|
||||
mode = newMode;
|
||||
mode.enter();
|
||||
dispatch.enter(mode);
|
||||
|
||||
var s1 = context.selectedIDs();
|
||||
dispatch.select(s1, s0);
|
||||
};
|
||||
|
||||
context.mode = function() {
|
||||
|
||||
@@ -75,7 +75,7 @@ iD.Map = function(context) {
|
||||
}
|
||||
});
|
||||
|
||||
context.on('select.map', function() {
|
||||
context.on('enter.map', function() {
|
||||
if (map.editable() && !transformed) {
|
||||
var all = context.intersects(map.extent()),
|
||||
filter = d3.functor(true),
|
||||
|
||||
Reference in New Issue
Block a user