stack transforms properly for tile layer anim, ref #1705
This commit is contained in:
parent
b5569dd0c3
commit
cd746192b5
@ -141,8 +141,11 @@ L.DomUtil = {
|
||||
point.y + 'px' + (is3d ? ',0)' : ')');
|
||||
},
|
||||
|
||||
setTransform: function (el, point, scale) {
|
||||
el.style[L.DomUtil.TRANSFORM] = L.DomUtil.getTranslateString(point) + (scale ? ' scale(' + scale + ')' : '');
|
||||
setTransform: function (el, point, scale, oldTransform) {
|
||||
el.style[L.DomUtil.TRANSFORM] =
|
||||
(oldTransform ? oldTransform + ' ' : '') +
|
||||
L.DomUtil.getTranslateString(point) +
|
||||
(scale ? ' scale(' + scale + ')' : '');
|
||||
},
|
||||
|
||||
getScaleString: function (scale, origin) {
|
||||
|
@ -465,14 +465,17 @@ L.GridLayer = L.Layer.extend({
|
||||
},
|
||||
|
||||
_animateZoom: function (e) {
|
||||
var oldTransform;
|
||||
|
||||
if (!this._animating) {
|
||||
this._animating = true;
|
||||
this._prepareBgBuffer();
|
||||
oldTransform = this._bgBuffer.style[L.DomUtil.TRANSFORM];
|
||||
}
|
||||
|
||||
var offset = e.delta.add(e.origin.multiplyBy(1 - e.scale));
|
||||
|
||||
L.DomUtil.setTransform(this._bgBuffer, offset, e.scale);
|
||||
L.DomUtil.setTransform(this._bgBuffer, offset, e.scale, oldTransform);
|
||||
},
|
||||
|
||||
_endZoomAnim: function () {
|
||||
|
Loading…
Reference in New Issue
Block a user