diff --git a/js/id/behavior/draw.js b/js/id/behavior/draw.js index f09ed79e4..551649f20 100644 --- a/js/id/behavior/draw.js +++ b/js/id/behavior/draw.js @@ -1,5 +1,5 @@ iD.behavior.Draw = function () { - var event = d3.dispatch('move', 'add', 'drop', 'cancel', 'finish'), + var event = d3.dispatch('move', 'add', 'undo', 'cancel', 'finish'), keybinding = d3.keybinding('draw'); function draw(selection) { @@ -13,7 +13,7 @@ iD.behavior.Draw = function () { function backspace() { d3.event.preventDefault(); - event.drop(); + event.undo(); } function del() { diff --git a/js/id/behavior/draw_way.js b/js/id/behavior/draw_way.js index f4909b150..bf0a4ad63 100644 --- a/js/id/behavior/draw_way.js +++ b/js/id/behavior/draw_way.js @@ -107,11 +107,6 @@ iD.behavior.DrawWay = function(wayId, headId, tailId, index, mode) { controller.enter(mode); }; - // Remove the temporary node and the last connected node but continue drawing. - drawWay.drop = function() { - history.undo(); - }; - // Finish the draw operation, removing the temporary node. If the way has enough // nodes to be valid, it's selected. Otherwise, return to browse mode. drawWay.finish = function() { @@ -138,7 +133,7 @@ iD.behavior.DrawWay = function(wayId, headId, tailId, index, mode) { draw = iD.behavior.Draw() .on('move', move) .on('add', add) - .on('drop', drawWay.drop) + .on('undo', history.undo) .on('cancel', drawWay.cancel) .on('finish', drawWay.finish);