From 46aff8d1ba50c323ac7ac8406a2c96ffddaad0d1 Mon Sep 17 00:00:00 2001 From: Ansis Brammanis Date: Fri, 11 Jan 2013 12:00:02 -0500 Subject: [PATCH] Fix connecting a way to an accuracy handle --- js/id/modes/draw_line.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/js/id/modes/draw_line.js b/js/id/modes/draw_line.js index a3db032b1..7400de80f 100644 --- a/js/id/modes/draw_line.js +++ b/js/id/modes/draw_line.js @@ -64,9 +64,15 @@ iD.modes.DrawLine = function(wayId, direction) { controller.enter(iD.modes.DrawLine(wayId, direction)); - } else if (datum.type === 'way') { + } else if (datum.type === 'way' || datum.accuracy) { // connect the way to an existing way - var choice = iD.util.geo.chooseIndex(datum, d3.mouse(surface.node()), map); + if (datum.accuracy) { + // if clicked on accuracy handle + datum.id = datum.way; + choice = datum; + } else { + var choice = iD.util.geo.chooseIndex(datum, d3.mouse(surface.node()), map); + } history.replace( iD.actions.MoveNode(node.id, choice.loc),