[Pkg-javascript-commits] [leaflet-markercluster] 93/128: Fixed zoomToShowLayer() markers disappearing bug

Jonas Smedegaard dr at jones.dk
Sun Apr 16 06:26:07 UTC 2017


This is an automated email from the git hooks/post-receive script.

js pushed a commit to branch master
in repository leaflet-markercluster.

commit 3468278a7688e84008e0b9bf464d20e781de3ea2
Author: z3ut <muraview.andrey at gmail.com>
Date:   Wed Jan 4 21:05:47 2017 +0200

    Fixed zoomToShowLayer() markers disappearing bug
---
 src/MarkerClusterGroup.js | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/MarkerClusterGroup.js b/src/MarkerClusterGroup.js
index 4031a68..a81b3da 100644
--- a/src/MarkerClusterGroup.js
+++ b/src/MarkerClusterGroup.js
@@ -542,10 +542,13 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
 			this.on('animationend', showMarker, this);
 			layer.__parent.zoomToBounds();
 
-			if (moveStart) {
-				//Never started moving, must already be there, probably need clustering however
-				showMarker.call(this);
-			}
+			//Delay execution to handle events
+			setTimeout(function () {
+				if (moveStart) {
+					//Never started moving, must already be there, probably need clustering however
+					showMarker.call(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