Skip to content

Commit

Permalink
pass editor tile down stack along with component id/tab name
Browse files Browse the repository at this point in the history
  • Loading branch information
aarongundel committed Dec 20, 2024
1 parent 37af58a commit b56e4aa
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions arches_lingo/src/arches_lingo/pages/SchemePage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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<string>();
const activeEditorArgs = ref<Array<object>>([]);
const editorTileId = ref<string>();
type sectionTypes =
| typeof SchemeLabel
Expand All @@ -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) => {
Expand Down Expand Up @@ -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)
"
/>
</template>
</SplitterPanel>
Expand All @@ -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"
Expand Down

0 comments on commit b56e4aa

Please sign in to comment.