mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-24 00:54:03 +02:00
Fix node redraw when escaping from draw mode
This is the case where the Array of changed element IDs contains an ID for which there is no corresponding entity in the graph. While `all` will not contain this entity, the filter should still return true given its id, so that it will appear in the exit selection and be removed.
This commit is contained in:
@@ -81,16 +81,13 @@ iD.Map = function() {
|
||||
} else {
|
||||
var only = {};
|
||||
difference.forEach(function (id) {
|
||||
var entity = graph.fetch(id);
|
||||
if (entity) {
|
||||
only[id] = entity;
|
||||
graph.parentWays(id).forEach(function (entity) {
|
||||
only[entity.id] = graph.fetch(entity.id);
|
||||
});
|
||||
}
|
||||
only[id] = graph.fetch(id);
|
||||
graph.parentWays(id).forEach(function (parent) {
|
||||
only[parent.id] = graph.fetch(parent.id);
|
||||
});
|
||||
});
|
||||
all = _.values(only);
|
||||
filter = function(d) { return d.accuracy ? only[d.way] : only[d.id]; };
|
||||
all = _.compact(_.values(only));
|
||||
filter = function(d) { return d.accuracy ? d.way in only : d.id in only; };
|
||||
}
|
||||
|
||||
if (all.length > 200000) return hideVector();
|
||||
|
||||
Reference in New Issue
Block a user