Merge pull request #4063 from Brobin/4062_control_layers
call getSize() instead of _size to avoid render error
This commit is contained in:
commit
5dac21b14b
@ -254,7 +254,7 @@ L.Control.Layers = L.Control.extend({
|
||||
_expand: function () {
|
||||
L.DomUtil.addClass(this._container, 'leaflet-control-layers-expanded');
|
||||
this._form.style.height = null;
|
||||
var acceptableHeight = this._map._size.y - (this._container.offsetTop + 50);
|
||||
var acceptableHeight = this._map.getSize().y - (this._container.offsetTop + 50);
|
||||
if (acceptableHeight < this._form.clientHeight) {
|
||||
L.DomUtil.addClass(this._form, 'leaflet-control-layers-scrollbar');
|
||||
this._form.style.height = acceptableHeight + 'px';
|
||||
|
Loading…
Reference in New Issue
Block a user