improve canvas removeLayer perf, close #3076
This commit is contained in:
parent
45ebba4159
commit
80b8d5f4c9
@ -100,12 +100,13 @@ L.Canvas = L.Renderer.extend({
|
||||
|
||||
for (var id in this._layers) {
|
||||
layer = this._layers[id];
|
||||
if (!this._redrawBounds || layer._pxBounds.intersects(this._redrawBounds)) {
|
||||
layer._updatePath();
|
||||
}
|
||||
|
||||
if (clear && layer._removed) {
|
||||
delete layer._removed;
|
||||
delete this._layers[id];
|
||||
|
||||
} else if (!this._redrawBounds || layer._pxBounds.intersects(this._redrawBounds)) {
|
||||
layer._updatePath();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user