[Pkg-javascript-commits] [leaflet] 02/03: back-port IE10/Chrome zoom anim fixes, bump version to 0.4.5
Jonas Smedegaard
dr at jones.dk
Thu Oct 16 16:33:17 UTC 2014
This is an automated email from the git hooks/post-receive script.
js pushed a commit to annotated tag v0.4.5
in repository leaflet.
commit 20435ff081ee8971ff00b2663d11b5da3a59c249
Author: danzel <danzel at localhost.geek.nz>
Date: Thu Oct 11 12:48:20 2012 +1300
back-port IE10/Chrome zoom anim fixes, bump version to 0.4.5
---
src/Leaflet.js | 2 +-
src/dom/DomUtil.js | 8 ++++----
src/map/anim/Map.ZoomAnimation.js | 5 -----
3 files changed, 5 insertions(+), 10 deletions(-)
diff --git a/src/Leaflet.js b/src/Leaflet.js
index 1ef8a76..b8282a2 100644
--- a/src/Leaflet.js
+++ b/src/Leaflet.js
@@ -14,4 +14,4 @@ if (typeof exports !== undefined + '') {
window.L = L;
}
-L.version = '0.4.4';
+L.version = '0.4.5';
diff --git a/src/dom/DomUtil.js b/src/dom/DomUtil.js
index 65eab4c..00cd67f 100644
--- a/src/dom/DomUtil.js
+++ b/src/dom/DomUtil.js
@@ -153,11 +153,11 @@ L.DomUtil = {
},
getScaleString: function (scale, origin) {
- var preTranslateStr = L.DomUtil.getTranslateString(origin),
- scaleStr = ' scale(' + scale + ') ',
- postTranslateStr = L.DomUtil.getTranslateString(origin.multiplyBy(-1));
- return preTranslateStr + scaleStr + postTranslateStr;
+ var preTranslateStr = L.DomUtil.getTranslateString(origin.add(origin.multiplyBy(-1 * scale))),
+ scaleStr = ' scale(' + scale + ') ';
+
+ return preTranslateStr + scaleStr;
},
setPosition: function (el, point, disable3D) {
diff --git a/src/map/anim/Map.ZoomAnimation.js b/src/map/anim/Map.ZoomAnimation.js
index 19a49fa..7a1817a 100644
--- a/src/map/anim/Map.ZoomAnimation.js
+++ b/src/map/anim/Map.ZoomAnimation.js
@@ -57,11 +57,6 @@ L.Map.include(!L.DomUtil.TRANSITION ? {} : {
clearTimeout(this._clearTileBgTimer);
- //dumb FireFox hack, I have no idea why this magic zero translate fixes the scale transition problem
- if (L.Browser.gecko || window.opera) {
- tileBg.style[transform] += ' translate(0,0)';
- }
-
L.Util.falseFn(tileBg.offsetWidth); //hack to make sure transform is updated before running animation
var scaleStr = L.DomUtil.getScaleString(scale, origin),
--
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