mirror of
https://github.com/FoggedLens/iD.git
synced 2026-06-05 14:38:05 +02:00
Merge branch 'master' of github.com:openstreetmap/iD
This commit is contained in:
@@ -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;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user