From 1ba5e84d23d798916e8fb0f99177b2310156948d Mon Sep 17 00:00:00 2001 From: Piero Toffanin Date: Wed, 16 Apr 2025 01:00:11 -0400 Subject: [PATCH] Refactor typeZIndex --- app/static/app/js/components/Map.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/static/app/js/components/Map.jsx b/app/static/app/js/components/Map.jsx index c9d06e4c..31585ee0 100644 --- a/app/static/app/js/components/Map.jsx +++ b/app/static/app/js/components/Map.jsx @@ -137,8 +137,8 @@ class Map extends React.Component { return ""; } - typeZIndex = (type, offset = 0) => { - return ["dsm", "dtm", "orthophoto", "plant"].indexOf(type) + 1 + offset; + typeZIndex = (type, zIndexGroup = 1) => { + return ["dsm", "dtm", "orthophoto", "plant"].indexOf(type) + 1 + zIndexGroup * 10; } hasBands = (bands, orthophoto_bands) => { @@ -299,7 +299,7 @@ class Map extends React.Component { tms: scheme === 'tms', opacity: this.state.opacity / 100, detectRetina: true, - zIndex: this.typeZIndex(type, zIndexGroup * 10), + zIndex: this.typeZIndex(type, zIndexGroup), }); // Associate metadata with this layer