prevent false move events in invalidateSize

This commit is contained in:
oslek
2013-02-13 12:38:33 -08:00
parent 52f61bf55a
commit 2c11fdfa6d

View File

@ -211,6 +211,7 @@ L.Map = L.Class.extend({
var offset = oldSize._subtract(this.getSize())._divideBy(2)._round();
if ((offset.x !== 0) || (offset.y !== 0)) {
if (animate === true) {
this.panBy(offset);
} else {
@ -221,6 +222,7 @@ L.Map = L.Class.extend({
clearTimeout(this._sizeTimer);
this._sizeTimer = setTimeout(L.bind(this.fire, this, 'moveend'), 200);
}
}
return this;
},