Skip to content

Commit

Permalink
fix some visibility bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
devincowan committed Apr 30, 2024
1 parent 6c26bfc commit fc3d6e0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
9 changes: 5 additions & 4 deletions frontend/src/components/DataViewDrawer.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<template>
<v-navigation-drawer location="right" width="auto" v-model="show" order="1" style="width: 30vw">
<v-navigation-drawer v-if="featureStore.activeFeature" location="right" width="auto" v-model="show" order="1"
style="width: 30vw">
<v-container v-if="featureStore.activeFeature">
<v-btn v-if="featureStore.activeFeature" @click="show = !show" location="left" order="0" postition="absolute"
:style="{ bottom: '30%', transform: translate(), position: 'absolute' }"
:icon="show ? mdiChevronRight : mdiChevronLeft">
</v-btn>
:style="{ bottom: '30%', transform: translate(), position: 'absolute' }"
:icon="show ? mdiChevronRight : mdiChevronLeft">
</v-btn>
<StaticMetadata />
<!-- <DynamicData /> -->
<v-btn v-if="!hasResults()" @click="query" color="primary" class="ma-2" :loading="querying">
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/LineChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const setParsing = (datasets) => {
dataset.parsing.yAxisKey = props.chosenVariable.abbreviation
})
}
if (props.chosenVariable !== undefined) {
if (props.chosenVariable !== undefined && chartData.value.datasets !== undefined) {
setParsing(chartData.value.datasets)
}
Expand Down
8 changes: 3 additions & 5 deletions frontend/src/views/ChartsView.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<v-container v-if="hasFeatures">
<v-container v-if="hasData">
<v-tabs v-model="varTab" align-tabs="center">
<v-tab v-for="variable in selectedVariables" :value="variable" :key="variable.abbreviation">
{{ variable.name }}
Expand All @@ -12,7 +12,7 @@
</v-window>
</v-container>

<v-container v-if="!hasFeatures">
<v-container v-if="!hasData">
<v-sheet border="md" class="pa-6 mx-auto ma-4" max-width="1200" rounded>
<span>
You don't have any data to view yet.
Expand Down Expand Up @@ -41,20 +41,18 @@

<script setup>
import LineChart from '@/components/LineChart.vue'
import { useFeaturesStore } from '../stores/features';
import { useChartsStore } from '../stores/charts';
import { useHydrologicStore } from '@/stores/hydrologic'
import { RouterLink } from 'vue-router';
import { ref } from 'vue'
import { computed } from 'vue';
const featureStore = useFeaturesStore();
const chartStore = useChartsStore();
const hydrologicStore = useHydrologicStore();
let sheetText = ref(null)
let hasFeatures = computed(() => featureStore.selectedFeatures.length > 0)
let hasData = computed(() => chartStore.chartData && chartStore.chartData.datasets?.length > 0)
let selectedVariables = hydrologicStore.selectedVariables
let varTab = ref(selectedVariables[0])
Expand Down

0 comments on commit fc3d6e0

Please sign in to comment.