mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-14 17:52:55 +00:00
17 lines
587 B
JavaScript
17 lines
587 B
JavaScript
// https://github.com/openstreetmap/potlatch2/blob/master/net/systemeD/halcyon/connection/actions/DeleteNodeAction.as
|
|
iD.actions.DeleteNode = function(node) {
|
|
return function(graph) {
|
|
graph.parentWays(node.id)
|
|
.forEach(function(parent) {
|
|
graph = iD.actions.RemoveWayNode(parent, node)(graph);
|
|
});
|
|
|
|
graph.parentRelations(node.id)
|
|
.forEach(function(parent) {
|
|
graph = iD.actions.RemoveRelationMember(parent, node)(graph);
|
|
});
|
|
|
|
return graph.remove(node, 'removed a node');
|
|
};
|
|
};
|