Port fix for Leaflet issue #1919
This commit is contained in:
parent
a89d75d3d8
commit
406e93de95
1 changed files with 2 additions and 1 deletions
3
vendor/assets/leaflet/leaflet.js
vendored
3
vendor/assets/leaflet/leaflet.js
vendored
|
@ -1752,6 +1752,7 @@ L.Map = L.Class.extend({
|
||||||
|
|
||||||
var oldSize = this.getSize();
|
var oldSize = this.getSize();
|
||||||
this._sizeChanged = true;
|
this._sizeChanged = true;
|
||||||
|
this._initialCenter = null;
|
||||||
|
|
||||||
if (this.options.maxBounds) {
|
if (this.options.maxBounds) {
|
||||||
this.setMaxBounds(this.options.maxBounds);
|
this.setMaxBounds(this.options.maxBounds);
|
||||||
|
@ -1825,7 +1826,7 @@ L.Map = L.Class.extend({
|
||||||
getCenter: function () { // (Boolean) -> LatLng
|
getCenter: function () { // (Boolean) -> LatLng
|
||||||
this._checkIfLoaded();
|
this._checkIfLoaded();
|
||||||
|
|
||||||
if (!this._moved()) {
|
if (this._initialCenter && !this._moved()) {
|
||||||
return this._initialCenter;
|
return this._initialCenter;
|
||||||
}
|
}
|
||||||
return this.layerPointToLatLng(this._getCenterLayerPoint());
|
return this.layerPointToLatLng(this._getCenterLayerPoint());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue