diff --git a/js/id/id.js b/js/id/id.js index 4522f85fc..6921d9f3e 100644 --- a/js/id/id.js +++ b/js/id/id.js @@ -107,7 +107,7 @@ window.iD = function () { }; context.selection = function() { - if (mode && mode.id === 'select') { + if (mode && mode.selection) { return mode.selection(); } else { return []; diff --git a/js/id/modes/draw_area.js b/js/id/modes/draw_area.js index aee2f153c..f109d2942 100644 --- a/js/id/modes/draw_area.js +++ b/js/id/modes/draw_area.js @@ -31,5 +31,9 @@ iD.modes.DrawArea = function(context, wayId, baseGraph) { context.uninstall(behavior); }; + mode.selection = function() { + return [wayId]; + }; + return mode; }; diff --git a/js/id/modes/draw_line.js b/js/id/modes/draw_line.js index 9fd07c937..6156fe87a 100644 --- a/js/id/modes/draw_line.js +++ b/js/id/modes/draw_line.js @@ -31,5 +31,9 @@ iD.modes.DrawLine = function(context, wayId, direction, baseGraph) { context.uninstall(behavior); }; + mode.selection = function() { + return [wayId]; + }; + return mode; };