mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-17 11:12:56 +00:00
14 lines
359 B
JavaScript
14 lines
359 B
JavaScript
iD.actions.DeleteMember = function(relationId, memberIndex) {
|
|
return function(graph) {
|
|
var relation = graph.entity(relationId)
|
|
.removeMember(memberIndex);
|
|
|
|
graph = graph.replace(relation);
|
|
|
|
if (relation.isDegenerate())
|
|
graph = iD.actions.DeleteRelation(relation.id)(graph);
|
|
|
|
return graph;
|
|
};
|
|
};
|