diff --git a/js/id/modes/move.js b/js/id/modes/move.js index d2089a2ad..b1fd7146f 100644 --- a/js/id/modes/move.js +++ b/js/id/modes/move.js @@ -30,6 +30,11 @@ iD.modes.Move = function(context, entityIDs) { if (nudgeInterval) window.clearInterval(nudgeInterval); nudgeInterval = window.setInterval(function() { context.pan(nudge); + context.replace( + iD.actions.Move(entityIDs, [-nudge[0], -nudge[1]], context.projection), + annotation); + var c = context.projection(origin); + origin = context.projection.invert([c[0] - nudge[0], c[1] - nudge[1]]); }, 50); } @@ -64,11 +69,13 @@ iD.modes.Move = function(context, entityIDs) { function finish() { d3.event.stopPropagation(); context.enter(iD.modes.Select(context, entityIDs)); + stopNudge(); } function cancel() { context.pop(); context.enter(iD.modes.Select(context, entityIDs)); + stopNudge(); } function undone() { diff --git a/js/id/renderer/map.js b/js/id/renderer/map.js index 4651b764e..07fbcf5d2 100644 --- a/js/id/renderer/map.js +++ b/js/id/renderer/map.js @@ -263,6 +263,7 @@ iD.Map = function(context) { t[1] += d[1]; projection.translate(t); zoom.translate(projection.translate()); + dispatch.move(map); return redraw(); };