diff --git a/src/components/general/ColumnItem.ts b/src/components/general/ColumnItem.ts index a9838c42..cd14df71 100644 --- a/src/components/general/ColumnItem.ts +++ b/src/components/general/ColumnItem.ts @@ -8,4 +8,6 @@ export interface ColumnItem { href?: string target?: string icon?: string + disabled?: boolean + tooltipText?: string } diff --git a/src/components/general/ColumnMenu.vue b/src/components/general/ColumnMenu.vue index bac754e4..ca37b0eb 100644 --- a/src/components/general/ColumnMenu.vue +++ b/src/components/general/ColumnMenu.vue @@ -36,11 +36,25 @@ " :to="child.to" :class="getClass(child)" + :disabled="child.disabled" > {{ child.name }} @@ -150,3 +164,9 @@ function recursiveFind(stack: ColumnItem[], id: string): boolean { return false } + + diff --git a/src/components/general/TreeMenuItem.vue b/src/components/general/TreeMenuItem.vue index dbed5b27..9247a878 100644 --- a/src/components/general/TreeMenuItem.vue +++ b/src/components/general/TreeMenuItem.vue @@ -13,11 +13,35 @@ {{ item.name }} - + {{ item.name }} + diff --git a/src/views/SpatialDisplayView.vue b/src/views/SpatialDisplayView.vue index dcd0e6d4..ade2498d 100644 --- a/src/views/SpatialDisplayView.vue +++ b/src/views/SpatialDisplayView.vue @@ -125,15 +125,22 @@ function attachLayersToMenu( ) { for (const layer of layers) { const groupNode = groupNodes.get(layer.path.toString()) + const noData = layer.completelyMissing || false const item: ColumnItem = { id: layer.name, name: layer.title || layer.name, - to: { + disabled: noData, + } + if (!noData) { + item.to = { name: 'SpatialDisplay', params: { layerName: layer.name, }, - }, + } + } else { + item.tooltipText = 'No data available' + item.icon = 'mdi-alert-circle-outline' } groupNode?.children?.push(item) }