mirror of
https://github.com/FoggedLens/iD.git
synced 2026-03-08 20:31:11 +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;
|
|
};
|
|
};
|