Move reflow into PosAnimation.stop so users don't have to implement it themselves.

This commit is contained in:
danzel 2012-11-09 16:13:52 +13:00
parent d528a03628
commit 6fbf2a21bf
2 changed files with 1 additions and 1 deletions

View File

@ -34,6 +34,7 @@ L.PosAnimation = L.Class.extend({
L.DomUtil.setPosition(this._el, this._getPos()); L.DomUtil.setPosition(this._el, this._getPos());
this._onTransitionEnd(); this._onTransitionEnd();
L.Util.falseFn(this._container.offsetWidth); // force reflow in case we are about to start a new animation
}, },
// you can't easily get intermediate values of properties animated with CSS3 Transitions, // you can't easily get intermediate values of properties animated with CSS3 Transitions,

View File

@ -10,7 +10,6 @@ L.Map.include({
if (this._panAnim) { if (this._panAnim) {
this._panAnim.stop(); this._panAnim.stop();
L.Util.falseFn(this._container.offsetWidth); // force reflow
} }
var done = (zoomChanged ? var done = (zoomChanged ?