mirror of
https://github.com/FoggedLens/iD.git
synced 2026-06-03 21:48:03 +02:00
9743ee282b
Pass entities to actions via id; this allows safe composition of actions that modify the same entity. Fix remaining ghost node cases (#213). Create more logical undo states when drawing.
8 lines
310 B
JavaScript
8 lines
310 B
JavaScript
iD.actions.RemoveRelationMember = function(relationId, memberId) {
|
|
return function(graph) {
|
|
var relation = graph.entity(relationId),
|
|
members = _.without(relation.members, memberId);
|
|
return graph.replace(relation.update({members: members}), 'removed from a relation');
|
|
};
|
|
};
|