prevent false move events in invalidateSize
This commit is contained in:
parent
52f61bf55a
commit
2c11fdfa6d
@ -211,15 +211,17 @@ L.Map = L.Class.extend({
|
||||
|
||||
var offset = oldSize._subtract(this.getSize())._divideBy(2)._round();
|
||||
|
||||
if (animate === true) {
|
||||
this.panBy(offset);
|
||||
} else {
|
||||
this._rawPanBy(offset);
|
||||
if ((offset.x !== 0) || (offset.y !== 0)) {
|
||||
if (animate === true) {
|
||||
this.panBy(offset);
|
||||
} else {
|
||||
this._rawPanBy(offset);
|
||||
|
||||
this.fire('move');
|
||||
this.fire('move');
|
||||
|
||||
clearTimeout(this._sizeTimer);
|
||||
this._sizeTimer = setTimeout(L.bind(this.fire, this, 'moveend'), 200);
|
||||
clearTimeout(this._sizeTimer);
|
||||
this._sizeTimer = setTimeout(L.bind(this.fire, this, 'moveend'), 200);
|
||||
}
|
||||
}
|
||||
return this;
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user