From b56e4aa53969fa342bde29ec922c3036a300b5fd Mon Sep 17 00:00:00 2001 From: Aaron Gundel Date: Fri, 20 Dec 2024 14:28:20 -0700 Subject: [PATCH] pass editor tile down stack along with component id/tab name --- arches_lingo/src/arches_lingo/pages/SchemePage.vue | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/arches_lingo/src/arches_lingo/pages/SchemePage.vue b/arches_lingo/src/arches_lingo/pages/SchemePage.vue index 5c852ecf..d77d2e7c 100644 --- a/arches_lingo/src/arches_lingo/pages/SchemePage.vue +++ b/arches_lingo/src/arches_lingo/pages/SchemePage.vue @@ -13,7 +13,7 @@ import SchemeEditor from "@/arches_lingo/components/scheme/editor/SchemeEditor.v const editorVisible = ref(false); const sectionVisible = ref(true); const editorTab = ref(); -const activeEditorArgs = ref>([]); +const editorTileId = ref(); type sectionTypes = | typeof SchemeLabel @@ -39,11 +39,11 @@ const onClose = () => { sectionVisible.value = true; }; -const onOpenEditor = (tab: string, ...args: object[]) => { +const onOpenEditor = (tab: string, tileId: string) => { editorTab.value = tab; editorVisible.value = true; sectionVisible.value = true; - activeEditorArgs.value = args; + editorTileId.value = tileId; }; const onUpdated = () => { childRefs.value.forEach((ref) => { @@ -79,7 +79,9 @@ const getRef = (el: object | null, index: number) => { :is="component.component" :ref="(el) => getRef(el, index)" v-bind="component.props" - @open-editor="onOpenEditor" + @open-editor=" + (tileId: string) => onOpenEditor(component.id, tileId) + " /> @@ -91,7 +93,7 @@ const getRef = (el: object | null, index: number) => { v-if="editorTab" :editor-max="sectionVisible" :active-tab="editorTab" - :active-args="activeEditorArgs" + :tile-id="editorTileId" @maximize="onMaximize" @side="onSide" @close="onClose"