diff --git a/src/components/spatialdisplay/SpatialTimeSeriesDisplay.vue b/src/components/spatialdisplay/SpatialTimeSeriesDisplay.vue index f911959f..9bd89b53 100644 --- a/src/components/spatialdisplay/SpatialTimeSeriesDisplay.vue +++ b/src/components/spatialdisplay/SpatialTimeSeriesDisplay.vue @@ -134,11 +134,6 @@ interface DisplayTypeItem { value: DisplayType } -watch(elevationChartDisplayconfig, () => { - if (displayType.value === DisplayType.ElevationChart) { - displayType.value = DisplayType.TimeSeriesChart - } -}) const displayType = ref(DisplayType.TimeSeriesChart) const displayTypeItems = computed(() => { const displayItems: DisplayTypeItem[] = [ @@ -165,6 +160,13 @@ const displayTypeItems = computed(() => { return displayItems }) +watch(displayTypeItems, () => { + const activeItems = displayTypeItems.value.map((dt) => dt.value) + if (!activeItems.includes(displayType.value)) { + displayType.value = activeItems[0] + } +}) + function onClose(): void { emit('close') }