Drop -> undo

This commit is contained in:
John Firebaugh
2013-01-24 18:14:40 -05:00
parent 7dba315974
commit 0fef1a8cfd
2 changed files with 3 additions and 8 deletions
+2 -2
View File
@@ -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() {
+1 -6
View File
@@ -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);