[Pkg-javascript-commits] [leaflet] 38/78: horrible hack that could fix a tile loading race condition in iOS

Jonas Smedegaard dr at jones.dk
Sat May 7 08:58:45 UTC 2016


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

js pushed a commit to branch master
in repository leaflet.

commit 3e200bed22bdb1f59e54f37c93b4fce034fd7ee4
Author: Vladimir Agafonkin <agafonkin at gmail.com>
Date:   Thu Sep 24 17:14:08 2015 +0300

    horrible hack that could fix a tile loading race condition in iOS
---
 src/map/anim/Map.ZoomAnimation.js | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/map/anim/Map.ZoomAnimation.js b/src/map/anim/Map.ZoomAnimation.js
index 253f221..615776c 100644
--- a/src/map/anim/Map.ZoomAnimation.js
+++ b/src/map/anim/Map.ZoomAnimation.js
@@ -100,10 +100,12 @@ L.Map.include(!L.DomUtil.TRANSITION ? {} : {
 
 		L.DomUtil.removeClass(this._mapPane, 'leaflet-zoom-anim');
 
-		this._resetView(this._animateToCenter, this._animateToZoom, true, true);
+		L.Util.requestAnimFrame(function () {
+			this._resetView(this._animateToCenter, this._animateToZoom, true, true);
 
-		if (L.Draggable) {
-			L.Draggable._disabled = false;
-		}
+			if (L.Draggable) {
+				L.Draggable._disabled = false;
+			}
+		}, this);
 	}
 });

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