Merge pull request #4367 from Leaflet/fix-4023
Just keep _moveEnd inside requestAnimFrame. Close #4023.
This commit is contained in:
commit
e083d41ff7
@ -122,13 +122,13 @@ L.Map.include(!zoomAnimated ? {} : {
|
|||||||
|
|
||||||
L.DomUtil.removeClass(this._mapPane, 'leaflet-zoom-anim');
|
L.DomUtil.removeClass(this._mapPane, 'leaflet-zoom-anim');
|
||||||
|
|
||||||
|
this._animatingZoom = false;
|
||||||
|
|
||||||
|
this._move(this._animateToCenter, this._animateToZoom);
|
||||||
|
|
||||||
// This anim frame should prevent an obscure iOS webkit tile loading race condition.
|
// This anim frame should prevent an obscure iOS webkit tile loading race condition.
|
||||||
L.Util.requestAnimFrame(function () {
|
L.Util.requestAnimFrame(function () {
|
||||||
this._animatingZoom = false;
|
this._moveEnd(true);
|
||||||
|
|
||||||
this
|
|
||||||
._move(this._animateToCenter, this._animateToZoom)
|
|
||||||
._moveEnd(true);
|
|
||||||
}, this);
|
}, this);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user