diff --git a/src/components/workflows/timeline/TimelineItem.vue b/src/components/workflows/timeline/TimelineItem.vue index c8b3831..c608c60 100644 --- a/src/components/workflows/timeline/TimelineItem.vue +++ b/src/components/workflows/timeline/TimelineItem.vue @@ -6,7 +6,7 @@ import MetricChart from "@/components/workflows/timeline/MetricChart.vue" import type { EvaluationResultsDocumentWide, GroundTruth, Workflow, WorkflowStep } from "@/types" import MetricAverageChart from "@/components/workflows/timeline/MetricAverageChart.vue" import { Icon } from '@iconify/vue' -import { onMounted, ref } from "vue" +import { onMounted, nextTick, ref } from "vue" import { OverlayPanelDropdownStyles } from "@/helpers/pt" import workflowsStore from "@/store/workflows-store" @@ -16,6 +16,7 @@ const props = defineProps<{ }>() const op = ref() +const isOpVisible = ref(false) const selectedStep = ref(null) const startDate = ref(new Date('2023-10-01')) const endDate = ref(new Date()) @@ -38,6 +39,19 @@ function hideParametersOverlay() { op.value?.hide() } +function toggleParameterOverlay(step: WorkflowStep, event: Event) { + if (isOpVisible.value) { + hideParametersOverlay() + if (selectedStep.value !== step) { + nextTick(() => { + showParametersOverlay(step, event) + }) + } + } else { + showParametersOverlay(step, event) + } +} +