mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-02 00:15:12 +02:00
17 lines
597 B
JavaScript
17 lines
597 B
JavaScript
// https://github.com/openstreetmap/potlatch2/blob/master/net/systemeD/halcyon/connection/actions/DeleteWayAction.as
|
|
iD.actions.remove = function(entity) {
|
|
return function(graph) {
|
|
graph.parentWays(entity.id)
|
|
.forEach(function(parent) {
|
|
graph = iD.actions.removeWayNode(parent, entity)(graph);
|
|
});
|
|
|
|
graph.parentRelations(entity.id)
|
|
.forEach(function(parent) {
|
|
graph = iD.actions.removeRelationEntity(parent, entity)(graph);
|
|
});
|
|
|
|
return graph.remove(entity, 'removed a feature');
|
|
};
|
|
};
|