Fix deleting areas

This commit is contained in:
Tom MacWright
2012-12-07 10:11:42 -05:00
parent a9e68ce3ee
commit 7c82710dbf
+4
View File
@@ -11,6 +11,10 @@ iD.actions.DeleteWay = function(wayId) {
way.nodes.forEach(function (nodeId) {
var node = graph.entity(nodeId);
// Circular ways include nodes more than once, so they
// can be deleted on earlier iterations of this loop.
if (!node) return;
graph = iD.actions.RemoveWayNode(wayId, nodeId)(graph);
if (!graph.parentWays(nodeId).length && !graph.parentRelations(nodeId).length) {