Fix connecting a way to an accuracy handle

This commit is contained in:
Ansis Brammanis
2013-01-11 12:00:02 -05:00
parent f9d205385a
commit 46aff8d1ba
+8 -2
View File
@@ -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),