fix zoom anim freeze race condition, close #2693, close #2478

This commit is contained in:
Vladimir Agafonkin 2015-03-02 15:26:05 +02:00
parent 4c8ffadf30
commit bbc3f2fab1

View File

@ -34,7 +34,15 @@ L.Map.include(!zoomAnimated ? {} : {
this._panes.mapPane.appendChild(proxy);
this.on('zoomanim', function (e) {
var prop = L.DomUtil.TRANSFORM,
transform = proxy.style[prop];
L.DomUtil.setTransform(proxy, this.project(e.center, e.zoom), this.getZoomScale(e.zoom, 1));
// workaround for case when transform is the same and so transitionend event is not fired
if (transform === proxy.style[prop] & this._animatingZoom) {
this._onZoomTransitionEnd();
}
}, this);
this.on('load moveend', function () {