From 70ed0e75c94021f879aa1d63fa35961894845324 Mon Sep 17 00:00:00 2001 From: Brobin Date: Tue, 1 Dec 2015 17:50:21 -0600 Subject: [PATCH] call getSize() instead of _size to avoid render error --- src/control/Control.Layers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/control/Control.Layers.js b/src/control/Control.Layers.js index 3d2ecb4c..df32c711 100644 --- a/src/control/Control.Layers.js +++ b/src/control/Control.Layers.js @@ -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';