Rename removeMember -> removeMembersWithID

This commit is contained in:
John Firebaugh
2013-05-16 14:06:10 -07:00
parent 4e5c18c0ac
commit affdc987e4
6 changed files with 10 additions and 10 deletions

View File

@@ -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);

View File

@@ -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)) {

View File

@@ -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) {

View File

@@ -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});
},