avoid history change when dragging midpoint

dragging a midpoint onto an adjacent node
should do nothing
This commit is contained in:
Ansis Brammanis
2013-03-12 14:38:01 -04:00
parent 409011da2d
commit 917d5bfaeb
+5 -1
View File
@@ -118,9 +118,13 @@ iD.modes.DragNode = function(context) {
connectAnnotation(d));
} else if (d.type === 'node' && adjacent(d)) {
context.replace(
if (wasMidpoint) {
context.history().pop();
} else {
context.replace(
iD.actions.DeleteNode(entity.id),
t('operations.delete.annotation.vertex'));
}
} else if (d.type === 'node' && d.id !== entity.id) {
context.replace(