mirror of
https://github.com/FoggedLens/iD.git
synced 2026-03-20 10:03:29 +00:00
Rename removeMember -> removeMembersWithID
This commit is contained in:
@@ -15,7 +15,7 @@ iD.actions.DeleteNode = function(nodeId) {
|
||||
|
||||
graph.parentRelations(node)
|
||||
.forEach(function(parent) {
|
||||
graph = graph.replace(parent.removeMember(nodeId));
|
||||
graph = graph.replace(parent.removeMembersWithID(nodeId));
|
||||
});
|
||||
|
||||
return graph.remove(node);
|
||||
|
||||
@@ -11,11 +11,11 @@ iD.actions.DeleteRelation = function(relationId) {
|
||||
|
||||
graph.parentRelations(relation)
|
||||
.forEach(function(parent) {
|
||||
graph = graph.replace(parent.removeMember(relationId));
|
||||
graph = graph.replace(parent.removeMembersWithID(relationId));
|
||||
});
|
||||
|
||||
_.uniq(_.pluck(relation.members, 'id')).forEach(function(memberId) {
|
||||
graph = graph.replace(relation.removeMember(memberId));
|
||||
graph = graph.replace(relation.removeMembersWithID(memberId));
|
||||
|
||||
var entity = graph.entity(memberId);
|
||||
if (deleteEntity(entity, graph)) {
|
||||
|
||||
@@ -11,7 +11,7 @@ iD.actions.DeleteWay = function(wayId) {
|
||||
|
||||
graph.parentRelations(way)
|
||||
.forEach(function(parent) {
|
||||
graph = graph.replace(parent.removeMember(wayId));
|
||||
graph = graph.replace(parent.removeMembersWithID(wayId));
|
||||
});
|
||||
|
||||
_.uniq(way.nodes).forEach(function(nodeId) {
|
||||
|
||||
@@ -73,7 +73,7 @@ _.extend(iD.Relation.prototype, {
|
||||
return this.update({members: members});
|
||||
},
|
||||
|
||||
removeMember: function(id) {
|
||||
removeMembersWithID: function(id) {
|
||||
var members = _.reject(this.members, function(m) { return m.id === id; });
|
||||
return this.update({members: members});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user