mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 09:12:52 +00:00
Extract Graph#modifications
This commit is contained in:
@@ -84,5 +84,11 @@ iD.Graph.prototype = {
|
||||
}
|
||||
entity.nodes = nodes;
|
||||
return entity;
|
||||
},
|
||||
|
||||
modifications: function() {
|
||||
_.filter(this.entities, function(entity) {
|
||||
return entity.modified;
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
@@ -535,9 +535,7 @@ iD.Map = function(elem, connection) {
|
||||
}
|
||||
|
||||
function commit() {
|
||||
connection.createChangeset(_.filter(history.graph().entities, function(e) {
|
||||
return e.modified;
|
||||
}));
|
||||
connection.createChangeset(history.graph().modifications());
|
||||
}
|
||||
|
||||
map.handleDrag = handleDrag;
|
||||
|
||||
Reference in New Issue
Block a user