diff --git a/Panels/Layer.js b/Panels/Layer.js index eb3d4a805..7cd1cb82e 100644 --- a/Panels/Layer.js +++ b/Panels/Layer.js @@ -437,7 +437,7 @@ function newLayer () { let backgroundColor = UI_COLOR.BLACK const RED_LINE_HIGHT = 4 - const OPACITY = 0.25 + const OPACITY = 0.75 let params = { cornerRadius: 0, diff --git a/Panels/LayersPanel.js b/Panels/LayersPanel.js index 3c9a82d6c..0c629f7d9 100644 --- a/Panels/LayersPanel.js +++ b/Panels/LayersPanel.js @@ -24,15 +24,16 @@ function newProductsPanel () { let visibleLayers = [] let firstVisibleLayer = 1 - const LAYER_SEPARATION = 5 + const LAYER_SEPARATION = 0 let panelTabButton let heatherHeight = 60 + let footerHeight = 15 let layerHeight = 90 let desiredVisibleLayers = 5 let posibleVisibleLayers = 5 - let desiredPanelHeight = (layerHeight + LAYER_SEPARATION) * desiredVisibleLayers + heatherHeight - let posiblePanelHeight = (layerHeight + LAYER_SEPARATION) * posibleVisibleLayers + heatherHeight + let desiredPanelHeight = (layerHeight + LAYER_SEPARATION) * desiredVisibleLayers + heatherHeight + footerHeight + let posiblePanelHeight = (layerHeight + LAYER_SEPARATION) * posibleVisibleLayers + heatherHeight + footerHeight let onMouseWheelEventSuscriptionId return thisObject @@ -129,12 +130,13 @@ function newProductsPanel () { function panelSizePhysics () { let viewPortHeight = viewPort.visibleArea.bottomLeft.y - viewPort.visibleArea.topLeft.y if (desiredPanelHeight > viewPortHeight) { - posibleVisibleLayers = Math.trunc((viewPortHeight - heatherHeight) / (layerHeight + LAYER_SEPARATION)) + posibleVisibleLayers = Math.trunc((viewPortHeight - heatherHeight - footerHeight) / (layerHeight + LAYER_SEPARATION)) } else { posibleVisibleLayers = desiredVisibleLayers } + if (thisObject.layers.length < posibleVisibleLayers) { posibleVisibleLayers = thisObject.layers.length } - posiblePanelHeight = (layerHeight + LAYER_SEPARATION) * posibleVisibleLayers + heatherHeight + posiblePanelHeight = (layerHeight + LAYER_SEPARATION) * posibleVisibleLayers + heatherHeight + footerHeight thisObject.container.frame.height = posiblePanelHeight } @@ -328,7 +330,7 @@ function newProductsPanel () { drawLabel(label1, 1 / 2, 0, 0, 20, 10, thisObject.container) drawLabel(label2, 1 / 2, 0, 0, 40, 10, thisObject.container) - drawIcon(icon1, 1 / 8, 0, 0, 20, 40, thisObject.container) - drawIcon(icon2, 7 / 8, 0, 0, 40, 40, thisObject.container) + drawIcon(icon1, 1 / 8, 0, 0, 30, 40, thisObject.container) + drawIcon(icon2, 7 / 8, 0, 0, 30, 40, thisObject.container) } }