Finish areas on double-click. Fixes #272

This commit is contained in:
Tom MacWright
2012-12-14 13:45:53 -05:00
parent 66f58ac96b
commit 1abffc6f8a
+10
View File
@@ -38,6 +38,16 @@ iD.modes.DrawArea = function(wayId) {
controller.enter(iD.modes.Select(way));
} else if (datum.id === headId) {
// finish the way
history.replace(
iD.actions.DeleteNode(node.id),
iD.actions.AddWayNode(way.id, tailId, -1),
'added to an area');
controller.enter(iD.modes.Select(way));
} else if (datum.type === 'node' && datum.id !== node.id) {
// connect the way to an existing node
history.replace(