[Pkg-javascript-commits] [leaflet-markercluster] 307/479: Make us not crash if we have a spidified cluster and it has a marker added to it. Fixes #114 bug 2
Jonas Smedegaard
dr at jones.dk
Thu Oct 16 16:00:45 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 1566118ac5865b46e3432238d867357bcf51f3d2
Author: danzel <danzel at localhost.geek.nz>
Date: Wed Jan 9 11:20:09 2013 +1300
Make us not crash if we have a spidified cluster and it has a marker added to it. Fixes #114 bug 2
---
src/MarkerCluster.Spiderfier.js | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/MarkerCluster.Spiderfier.js b/src/MarkerCluster.Spiderfier.js
index c66723a..d2e883c 100644
--- a/src/MarkerCluster.Spiderfier.js
+++ b/src/MarkerCluster.Spiderfier.js
@@ -249,6 +249,11 @@ L.MarkerCluster.include(!L.DomUtil.TRANSITION ? {
for (i = childMarkers.length - 1; i >= 0; i--) {
m = childMarkers[i];
+ //Marker was added to us after we were spidified
+ if (!m._preSpiderfyLatlng) {
+ continue;
+ }
+
//Fix up the location to the real one
m.setLatLng(m._preSpiderfyLatlng);
delete m._preSpiderfyLatlng;
--
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