[Pkg-javascript-commits] [leaflet-markercluster] 266/479: Make removeLayers when not on the map a bit less wasteful
Jonas Smedegaard
dr at jones.dk
Thu Oct 16 16:00:38 UTC 2014
This is an automated email from the git hooks/post-receive script.
js pushed a commit to branch master
in repository leaflet-markercluster.
commit 1cc375d324779e05752de04cc100a286abbc1f99
Author: danzel <danzel at localhost.geek.nz>
Date: Thu Oct 11 10:45:16 2012 +1300
Make removeLayers when not on the map a bit less wasteful
---
src/MarkerClusterGroup.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/MarkerClusterGroup.js b/src/MarkerClusterGroup.js
index cdc3d5d..ac80665 100644
--- a/src/MarkerClusterGroup.js
+++ b/src/MarkerClusterGroup.js
@@ -154,7 +154,7 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
if (!this._map) {
for (i = 0, l = layersArray.length; i < l; i++) {
- this.removeLayer(layersArray[i]);
+ this._arraySplice(this._needsClustering, layersArray[i]);
}
return this;
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/leaflet-markercluster.git
More information about the Pkg-javascript-commits
mailing list