Merge pull request #302 from giscloud/invalidatesize.fix
don't proceed with invalidation if map is not loaded
This commit is contained in:
commit
149437a422
@ -177,6 +177,8 @@ L.Map = L.Class.extend({
|
||||
},
|
||||
|
||||
invalidateSize: function() {
|
||||
if (!this._loaded) return this;
|
||||
|
||||
var oldSize = this.getSize();
|
||||
this._sizeChanged = true;
|
||||
this._rawPanBy(oldSize.subtract(this.getSize()).divideBy(2));
|
||||
|
Loading…
Reference in New Issue
Block a user