chore: refactor graphStack to be simpler

This commit is contained in:
2026-05-05 18:45:54 +02:00
parent 8ad62cfc8e
commit ed11195327
8 changed files with 243 additions and 192 deletions
@@ -1,6 +1,7 @@
<script lang="ts">
import { createKeyMap } from '$lib/helpers/createKeyMap';
import type { Graph, NodeInstance, NodeRegistry } from '@nodarium/types';
import { onMount } from 'svelte';
import { GraphManager } from '../graph-manager.svelte';
import { GraphState, setGraphManager, setGraphState } from '../graph-state.svelte';
import { setupKeymaps } from '../keymaps';
@@ -83,8 +84,8 @@
manager.on('save', (save) => onsave?.(save));
$effect(() => {
if (graph && (manager.status !== 'idle' || manager.graph.id !== graph.id)) {
onMount(() => {
if (graph) {
manager.load(graph);
}
});