From 3bdaab0bb3d46865099133e1d7da01f35fa555c4 Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Fri, 26 Apr 2013 12:28:25 -0700 Subject: [PATCH] Fix dragging a node to another node --- js/id/modes/drag_node.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/id/modes/drag_node.js b/js/id/modes/drag_node.js index d0c016801..748ad4998 100644 --- a/js/id/modes/drag_node.js +++ b/js/id/modes/drag_node.js @@ -121,8 +121,9 @@ iD.modes.DragNode = function(context) { connectAnnotation(d)); } else if (d.type === 'node' && d.id !== entity.id) { + // `entity` is last so it will survive and it's parent ways can be selected below. context.replace( - iD.actions.Connect([entity.id, d.id]), + iD.actions.Connect([d.id, entity.id]), connectAnnotation(d)); } else if (wasMidpoint) {