diff --git a/frontend/src/lib/components/graph/FlowGraphV2.svelte b/frontend/src/lib/components/graph/FlowGraphV2.svelte index bb88abfd98..7ea4710f7e 100644 --- a/frontend/src/lib/components/graph/FlowGraphV2.svelte +++ b/frontend/src/lib/components/graph/FlowGraphV2.svelte @@ -145,8 +145,8 @@ dispatch('delete', detail) }, - newBranch: (detail, label) => { - dispatch('newBranch', detail) + newBranch: (module) => { + dispatch('newBranch', module) }, move: (module, modules) => { dispatch('move', { module, modules }) @@ -154,7 +154,8 @@ selectIteration: (detail, moduleId) => { dispatch('selectIteration', { ...detail, moduleId: moduleId }) } - } + }, + success ) const nodes = writable([]) @@ -163,14 +164,10 @@ function updateStores() { $nodes = layoutNodes(graph?.nodes) $edges = graph.edges - - renderCount++ } $: graph && updateStores() - let renderCount: number = 0 - const nodeTypes = { input2: InputNode, module: ModuleNode, @@ -210,34 +207,32 @@ bind:clientWidth={width} class="h-full" > - {#key renderCount} - handleNodeClick(e)} - on:delete={(e) => { - console.log('delete', e.detail) - }} - > - - - {#if download} - dispatch('expand')} class="!bg-surface"> - - - {/if} - - - {/key} + handleNodeClick(e)} + on:delete={(e) => { + console.log('delete', e.detail) + }} + > + + + {#if download} + dispatch('expand')} class="!bg-surface"> + + + {/if} + +