[Pkg-javascript-commits] [leaflet-markercluster] 118/479: Handle zooming to the same zoom level you are already on (touchzoom on iOS can cause this)

Jonas Smedegaard dr at jones.dk
Thu Oct 16 16:00:18 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 9ade8eb10bbb43173e08e68334e2404d60582e49
Author: danzel <danzel at localhost.geek.nz>
Date:   Thu Jul 26 12:02:12 2012 +1200

    Handle zooming to the same zoom level you are already on (touchzoom on iOS can cause this)
---
 src/MarkerClusterGroup.js | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/MarkerClusterGroup.js b/src/MarkerClusterGroup.js
index 8040c25..e4d4be2 100644
--- a/src/MarkerClusterGroup.js
+++ b/src/MarkerClusterGroup.js
@@ -143,7 +143,6 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
 	},
 
 	_zoomEnd: function () {
-		this._animationStart();
 
 		this._mergeSplitClusters();
 
@@ -190,14 +189,18 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
 	_mergeSplitClusters: function () {
 
 		if (this._zoom < this._map._zoom) { //Zoom in, split
+			this._animationStart();
 			//Remove clusters now off screen
 			this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds, this._zoom - this._topClusterLevel._zoom, this._getExpandedVisibleBounds());
 
 			this._animationZoomIn(this._zoom, this._map._zoom);
 
 		} else if (this._zoom > this._map._zoom) { //Zoom out, merge
+			this._animationStart();
 
 			this._animationZoomOut(this._zoom, this._map._zoom);
+		} else {
+			this._moveEnd();
 		}
 	},
 

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