From 519a38aa84d88e84ea7f84bd53d44ba7487ffb36 Mon Sep 17 00:00:00 2001 From: Paul Elliott Date: Mon, 18 Sep 2023 16:08:07 -0400 Subject: [PATCH] feat(ToolStrip): add select tool which enables hover popup --- src/components/ToolStrip.vue | 9 +++++++++ src/composables/annotationTool.ts | 19 ++++++++++++++----- src/store/tools/types.ts | 1 + 3 files changed, 24 insertions(+), 5 deletions(-) diff --git a/src/components/ToolStrip.vue b/src/components/ToolStrip.vue index 73bfdba83..4d19e6d4b 100644 --- a/src/components/ToolStrip.vue +++ b/src/components/ToolStrip.vue @@ -48,6 +48,15 @@ />
+ + + ( : ({ visible: false } as Info) ); - return { overlayInfo, onHover }; + const toolStore = useToolStore(); + const noInfoWithoutSelect = computed(() => { + if (toolStore.currentTool !== Tools.Select) + return { visible: false } as Info; + return overlayInfo.value; + }); + + return { overlayInfo: noInfoWithoutSelect, onHover }; }; diff --git a/src/store/tools/types.ts b/src/store/tools/types.ts index 6ab9b36d3..f73e6e8d3 100644 --- a/src/store/tools/types.ts +++ b/src/store/tools/types.ts @@ -8,4 +8,5 @@ export enum Tools { Crosshairs = 'Crosshairs', Crop = 'Crop', Polygon = 'Polygon', + Select = 'Select', }