Merge pull request #4367 from Leaflet/fix-4023

Just keep _moveEnd inside requestAnimFrame. Close #4023.
This commit is contained in:
Iván Sánchez Ortega 2016-04-02 20:08:51 +02:00
commit e083d41ff7

View File

@ -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);
} }
}); });