[Pkg-javascript-commits] [leaflet] 01/40: Don't set _animatingZoom for touchZoom zooming. refs #1934

Jonas Smedegaard dr at jones.dk
Thu Oct 16 16:33:06 UTC 2014


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

js pushed a commit to branch master
in repository leaflet.

commit 9cd4f1b5bc4a78d26cb9f4c042176f80b624fd69
Author: danzel <danzel at localhost.geek.nz>
Date:   Wed Jan 22 10:56:57 2014 +1300

    Don't set _animatingZoom for touchZoom zooming. refs #1934
---
 src/map/anim/Map.ZoomAnimation.js | 6 ++++--
 src/map/handler/Map.TouchZoom.js  | 2 +-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/map/anim/Map.ZoomAnimation.js b/src/map/anim/Map.ZoomAnimation.js
index ead4fbd..709dd43 100644
--- a/src/map/anim/Map.ZoomAnimation.js
+++ b/src/map/anim/Map.ZoomAnimation.js
@@ -61,9 +61,11 @@ L.Map.include(!L.DomUtil.TRANSITION ? {} : {
 		return true;
 	},
 
-	_animateZoom: function (center, zoom, origin, scale, delta, backwards) {
+	_animateZoom: function (center, zoom, origin, scale, delta, backwards, forTouchZoom) {
 
-		this._animatingZoom = true;
+		if (!forTouchZoom) {
+			this._animatingZoom = true;
+		}
 
 		// put transform transition on all layers with leaflet-zoom-animated class
 		L.DomUtil.addClass(this._mapPane, 'leaflet-zoom-anim');
diff --git a/src/map/handler/Map.TouchZoom.js b/src/map/handler/Map.TouchZoom.js
index 7f9ea66..abbf610 100644
--- a/src/map/handler/Map.TouchZoom.js
+++ b/src/map/handler/Map.TouchZoom.js
@@ -85,7 +85,7 @@ L.Map.TouchZoom = L.Handler.extend({
 		    center = map.layerPointToLatLng(origin),
 		    zoom = map.getScaleZoom(this._scale);
 
-		map._animateZoom(center, zoom, this._startCenter, this._scale, this._delta);
+		map._animateZoom(center, zoom, this._startCenter, this._scale, this._delta, false, true);
 	},
 
 	_onTouchEnd: function () {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/leaflet.git



More information about the Pkg-javascript-commits mailing list