From 237e02ff1fed49cf51f3a777ab9d77b1aba88e95 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Wed, 29 Jan 2020 12:50:50 +0100 Subject: [PATCH] Layers Manager remembering visible layers --- Panels/LayersPanel.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Panels/LayersPanel.js b/Panels/LayersPanel.js index 34c4d5711..5bcd308ed 100644 --- a/Panels/LayersPanel.js +++ b/Panels/LayersPanel.js @@ -75,6 +75,12 @@ function newLayersPanel () { panelTabButton.initialize() onMouseWheelEventSuscriptionId = thisObject.container.eventHandler.listenToEvent('onMouseWheel', onMouseWheel) + + let storedValue = loadPropertyFromNodeConfig(thisObject.payload, 'visibleLayers') + if (storedValue >= 0 && storedValue <= 20) { + desiredVisibleLayers = storedValue + } + isInitialized = true } @@ -135,6 +141,7 @@ function newLayersPanel () { } desiredPanelHeight = (layerHeight + LAYER_SEPARATION) * desiredVisibleLayers + heatherHeight + footerHeight calculateVisbleLayers() + savePropertyAtNodeConfig(thisObject.payload, 'visibleLayers', desiredVisibleLayers) } function panelSizePhysics () {