dynamic view > compare mode : disable comment

This commit is contained in:
isUnknown 2024-12-19 17:18:26 +01:00
parent b4be010af7
commit f74c818ffc
3 changed files with 16 additions and 2 deletions

View file

@ -50,8 +50,10 @@ import { ref, computed, watch } from "vue";
import { storeToRefs } from "pinia";
import { usePageStore } from "../../../stores/page";
import Interactive360 from "./Interactive360.vue";
import { useDialogStore } from "../../../stores/dialog";
const { page } = storeToRefs(usePageStore());
const { isCommentsOpen, isCommentPanelEnabled } = storeToRefs(useDialogStore());
const tracks = computed(
() => page.value.steps[page.value.steps.length - 1].files.dynamic
@ -59,6 +61,13 @@ const tracks = computed(
const isCompareModeEnabled = ref(false);
watch(isCompareModeEnabled, (newValue) => {
if (newValue) {
isCommentsOpen.value = false;
isCommentPanelEnabled.value = false;
} else {
isCommentPanelEnabled.value = true;
}
if (!newValue && activeTracks.value.length === 2) {
activeTracks.value.pop();
}