Initialize _sizeChanged to prevent async issues
When asynchronously initializing a map, the series of events can create a scenario where _size is incorrectly initialized, and therefore calls to getSize will not cause a new value to be generated. This fix sets _sizeChanged to true upon map initialization, which allows the following first call to getSize to work properly. Closes #3031
This commit is contained in:
parent
76440b9df2
commit
86a3e0cc8c
@ -44,6 +44,7 @@ L.Map = L.Evented.extend({
|
|||||||
this._handlers = [];
|
this._handlers = [];
|
||||||
this._layers = {};
|
this._layers = {};
|
||||||
this._zoomBoundLayers = {};
|
this._zoomBoundLayers = {};
|
||||||
|
this._sizeChanged = true;
|
||||||
|
|
||||||
this.callInitHooks();
|
this.callInitHooks();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user