fix #109
This commit is contained in:
parent
1ae2964d58
commit
8d51dc3727
2 changed files with 6 additions and 4 deletions
|
|
@ -63,6 +63,9 @@ const api = useApiStore();
|
||||||
const { page } = storeToRefs(usePageStore());
|
const { page } = storeToRefs(usePageStore());
|
||||||
|
|
||||||
const isOpen = ref(true);
|
const isOpen = ref(true);
|
||||||
|
const hasDTLProposal = computed(() => {
|
||||||
|
return page.value?.designToLight;
|
||||||
|
});
|
||||||
|
|
||||||
watch(isOpen, (newValue) => {
|
watch(isOpen, (newValue) => {
|
||||||
router.push({ name: route.name });
|
router.push({ name: route.name });
|
||||||
|
|
@ -74,11 +77,10 @@ openedFile.value = route.query.fileIndex
|
||||||
: dialog.content.files.find((file) => file.type === "document");
|
: dialog.content.files.find((file) => file.type === "document");
|
||||||
|
|
||||||
const correspondingDTLProposal = computed(() => {
|
const correspondingDTLProposal = computed(() => {
|
||||||
const hasDTLProposal = page.value?.designToLight;
|
if (!hasDTLProposal.value || !isOpen.value || !openedFile.value) return false;
|
||||||
if (!hasDTLProposal || !isOpen.value || !openedFile.value) return false;
|
|
||||||
|
|
||||||
const correspondingDTLProposal = page.value.designToLight.find((proposal) => {
|
const correspondingDTLProposal = page.value.designToLight.find((proposal) => {
|
||||||
return openedFile.value.source === proposal.location.source;
|
return openedFile.value.source === proposal.location?.source;
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!correspondingDTLProposal) return false;
|
if (!correspondingDTLProposal) return false;
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ localStorage.setItem("isHelperHidden", true);
|
||||||
// Grab interaction
|
// Grab interaction
|
||||||
const yMax = computed(() => {
|
const yMax = computed(() => {
|
||||||
return parseInt(
|
return parseInt(
|
||||||
activeTrack.files[activeTrack.files.length - 1].name.charAt(0)
|
activeTrack.files[activeTrack.files.length - 1].name.split("_")[0]
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
const xMax = computed(() => {
|
const xMax = computed(() => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue