From bc53ae457e1ac8fff61d02f5eecf4e70b5177d77 Mon Sep 17 00:00:00 2001 From: Ansis Brammanis Date: Wed, 9 Jan 2013 17:44:20 -0500 Subject: [PATCH] Fix undo while drawing --- js/id/modes/draw_line.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/js/id/modes/draw_line.js b/js/id/modes/draw_line.js index ffdab2480..9f4ee548c 100644 --- a/js/id/modes/draw_line.js +++ b/js/id/modes/draw_line.js @@ -125,6 +125,12 @@ iD.modes.DrawLine = function(wayId, direction) { .on('⌫.drawline', backspace) .on('⌦.drawline', del) .on('↩.drawline', ret); + + d3.select('#undo').on('click.drawline', function() { + history.undo(); + controller.enter(iD.modes.Browse()); + }); + }; mode.exit = function() {