[Pkg-javascript-commits] [leaflet-markercluster] 342/479: Make this work on old leaflet too. Thanks @nkovacs

Jonas Smedegaard dr at jones.dk
Thu Oct 16 16:00:49 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 ef4227dcd2122f63aaa3491d5b1e65a633a3b837
Author: danzel <danzel at localhost.geek.nz>
Date:   Wed Apr 24 10:08:20 2013 +1200

    Make this work on old leaflet too. Thanks @nkovacs
---
 src/MarkerCluster.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/MarkerCluster.js b/src/MarkerCluster.js
index bd2a7f3..073f945 100644
--- a/src/MarkerCluster.js
+++ b/src/MarkerCluster.js
@@ -272,7 +272,7 @@ L.MarkerCluster = L.Marker.extend({
 				for (i = c._childClusters.length - 1; i >= 0; i--) {
 					m = c._childClusters[i];
 					if (!exceptBounds || !exceptBounds.contains(m._latlng)) {
-						if (L.FeatureGroup.prototype.hasLayer.call(c._group, m)) {
+						if (!L.FeatureGroup.prototype.hasLayer || L.FeatureGroup.prototype.hasLayer.call(c._group, m)) {
 							L.FeatureGroup.prototype.removeLayer.call(c._group, m);
 						}
 						m.setOpacity(1);

-- 
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