[Pkg-javascript-commits] [leaflet-markercluster] 409/479: Fix markers not being added on a big zoom animation. Fixes #216

Jonas Smedegaard dr at jones.dk
Thu Oct 16 16:01:02 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 4ce11f3c8b4a1f4c82198f06a4f082dff243682d
Author: danzel <danzel at localhost.geek.nz>
Date:   Wed Jul 10 11:04:55 2013 +1200

    Fix markers not being added on a big zoom animation. Fixes #216
    
    If we zoomed down such that a cluster would be out of our visible bounds then any of its children would be added at its location for the animation. In this case those markers would immediately be removed as they are out of our visible bounds.
    Instead we now don't animate adding markers after a zoom if they are coming from outside of our visible bounds.
---
 src/MarkerClusterGroup.js | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/MarkerClusterGroup.js b/src/MarkerClusterGroup.js
index ac3f51d..5a5426d 100644
--- a/src/MarkerClusterGroup.js
+++ b/src/MarkerClusterGroup.js
@@ -840,6 +840,10 @@ L.MarkerClusterGroup.include(!L.DomUtil.TRANSITION ? {
 				markers = c._markers,
 				m;
 
+			if (!bounds.contains(startPos)) {
+				startPos = null;
+			}
+
 			if (c._isSingleParent() && previousZoomLevel + 1 === newZoomLevel) { //Immediately add the new child and remove us
 				fg.removeLayer(c);
 				c._recursivelyAddChildrenToMap(null, newZoomLevel, bounds);

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