mirror of
https://github.com/FoggedLens/iD.git
synced 2026-04-30 15:38:27 +02:00
14 lines
350 B
JavaScript
14 lines
350 B
JavaScript
module.exports = 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;
|
|
};
|
|
};
|