From 72a81cf8b47a5eb94eb8675baa04427078af2c2f Mon Sep 17 00:00:00 2001 From: Vijayan Balasubramanian Date: Thu, 8 Dec 2022 20:16:09 -0800 Subject: [PATCH] Disable layer if hidden Update disable property based on layer visibility. Signed-off-by: Vijayan Balasubramanian --- .../components/layer_control_panel/layer_control_panel.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/maps_dashboards/public/components/layer_control_panel/layer_control_panel.tsx b/maps_dashboards/public/components/layer_control_panel/layer_control_panel.tsx index 0f7e4fd0..954df699 100644 --- a/maps_dashboards/public/components/layer_control_panel/layer_control_panel.tsx +++ b/maps_dashboards/public/components/layer_control_panel/layer_control_panel.tsx @@ -222,6 +222,7 @@ const LayerControlPanel = memo(({ maplibreRef, setLayers, layers }: Props) => { iconType={LAYER_ICON_TYPE_MAP[layer.type]} aria-label="layer in the map layers list" onClick={() => onClickLayerName(layer)} + isDisabled={layerVisibility.get(layer.id) ? false : true} />