Skip to content

Commit

Permalink
Merge pull request #4367 from Leaflet/fix-4023
Browse files Browse the repository at this point in the history
Just keep _moveEnd inside requestAnimFrame. Close #4023.
  • Loading branch information
IvanSanchez committed Apr 2, 2016
2 parents cd9c813 + 4a00996 commit e083d41
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/map/anim/Map.ZoomAnimation.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,13 @@ L.Map.include(!zoomAnimated ? {} : {

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.
L.Util.requestAnimFrame(function () {
this._animatingZoom = false;

this
._move(this._animateToCenter, this._animateToZoom)
._moveEnd(true);
this._moveEnd(true);
}, this);
}
});

0 comments on commit e083d41

Please sign in to comment.