diff --git a/js/id/renderer/map.js b/js/id/renderer/map.js index d64d32300..e57fc8b4a 100644 --- a/js/id/renderer/map.js +++ b/js/id/renderer/map.js @@ -32,10 +32,6 @@ iD.Map = function(context) { context.history() .on('change.map', redraw); - context.on('select.map', function() { - redraw(); - }); - selection.call(zoom); supersurface = selection.append('div') @@ -78,6 +74,18 @@ iD.Map = function(context) { } }); + context.on('select.map', function() { + if (map.editable() && !transformed) { + var all = context.intersects(map.extent()), + filter = d3.functor(true), + extent = map.extent(), + graph = context.graph(); + surface.call(vertices, graph, all, filter, map.zoom()); + surface.call(midpoints, graph, all, filter, extent); + dispatch.drawn(map); + } + }); + map.size(selection.size()); map.surface = surface;