diff --git a/packages/frontend-2/components/viewer/controls/Bottom.vue b/packages/frontend-2/components/viewer/controls/Bottom.vue index 48e38f9ec..e9dbc3ec5 100644 --- a/packages/frontend-2/components/viewer/controls/Bottom.vue +++ b/packages/frontend-2/components/viewer/controls/Bottom.vue @@ -72,7 +72,7 @@ const emit = defineEmits<{ const { getShortcutDisplayText, shortcuts, registerShortcuts } = useViewerShortcuts() const { toggleSectionBox, - resetSectionBox, + resetSectionBoxCompletely, closeSectionBox, isSectionBoxEnabled, isSectionBoxVisible @@ -188,7 +188,7 @@ const onReset = () => { resetExplode() } if (activePanel.value === ActivePanel.sectionBox) { - resetSectionBox() + resetSectionBoxCompletely() } } diff --git a/packages/frontend-2/lib/viewer/composables/ui.ts b/packages/frontend-2/lib/viewer/composables/ui.ts index d6eeef224..93be50b45 100644 --- a/packages/frontend-2/lib/viewer/composables/ui.ts +++ b/packages/frontend-2/lib/viewer/composables/ui.ts @@ -84,12 +84,18 @@ export function useSectionBoxUtilities() { } } + const resetSectionBoxCompletely = () => { + sectionBox.value = null + visible.value = false + } + return { isSectionBoxEnabled, isSectionBoxVisible, isSectionBoxEdited, toggleSectionBox, resetSectionBox, + resetSectionBoxCompletely, sectionBox, closeSectionBox }