From 192df69b357f997c62bc976559eb5c8b592b0f8c Mon Sep 17 00:00:00 2001 From: Lisa Stillwell Date: Thu, 21 Sep 2023 14:23:08 -0400 Subject: [PATCH] added some debugging for removal of hurr layers --- lib/custom-ui/components/utils/storm-layers.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/custom-ui/components/utils/storm-layers.js b/lib/custom-ui/components/utils/storm-layers.js index 7d54c210b..b7fd8a41f 100644 --- a/lib/custom-ui/components/utils/storm-layers.js +++ b/lib/custom-ui/components/utils/storm-layers.js @@ -140,7 +140,12 @@ export function removeStormLayers(viewState, item) { const layer_id = getTruncatedId(layer.uniqueId); return layer_id === item_id; }).length; - + console.log("workbench items:"); + console.log(viewState.terria.workbench.items); + console.log("item:"); + console.log(item); + console.log("num_layers:"); + console.log(num_layers); // only remove the storm layers if all of the // layers for the same model run are gone. if (num_layers <= LAYER_TYPES.length) { @@ -152,6 +157,8 @@ export function removeStormLayers(viewState, item) { viewState.terria.workbench.remove(layer); }); } + console.log("workbench items after deletes:"); + console.log(viewState.terria.workbench.items); } export function toggleStormLayerVisability(viewState, item) {}