Merge branch 'master' of github.com:openstreetmap/iD

This commit is contained in:
Bryan Housel
2014-06-26 16:50:54 -04:00
8 changed files with 80 additions and 8 deletions
+9 -1
View File
@@ -1,5 +1,13 @@
iD.actions.DeleteMember = function(relationId, memberIndex) {
return function(graph) {
return graph.replace(graph.entity(relationId).removeMember(memberIndex));
var relation = graph.entity(relationId)
.removeMember(memberIndex);
graph = graph.replace(relation);
if (relation.isDegenerate())
graph = iD.actions.DeleteRelation(relation.id)(graph);
return graph;
};
};
+4
View File
@@ -17,6 +17,10 @@ iD.ui.RawMemberEditor = function(context) {
context.perform(
iD.actions.DeleteMember(d.relation.id, d.index),
t('operations.delete_member.annotation'));
if (!context.hasEntity(d.relation.id)) {
context.enter(iD.modes.Browse(context));
}
}
function rawMemberEditor(selection) {