commit 0fff54fb77d5df1e88cc1e775ac051bef5ce3c6a parent 95d2a4e85a474bd87058e31907e85f42c74ff36c Author: Sergej Orlov <wladimirych@gmail.com> Date: Wed, 30 Nov 2016 11:18:31 +0300 [layers adaptivre size] fixed enabling before adding to map Diffstat:
M | src/lib/leaflet.control.layers.adaptive-height/adaptive-height.js | | | 2 | +- |
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/lib/leaflet.control.layers.adaptive-height/adaptive-height.js b/src/lib/leaflet.control.layers.adaptive-height/adaptive-height.js @@ -13,7 +13,7 @@ function enableAdaptiveHeight(control) { onAdd: function(map) { const result = originalOnAdd.call(this, map); this.__setupResizeEventsHandler(); - this.__setAdaptiveHeight(); + setTimeout(() => this.__setAdaptiveHeight(), 0); return result; },