mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-27 10:22:35 +02:00
Drop -> undo
This commit is contained in:
@@ -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() {
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user