{#if insertable} {/if}
{#if graph?.error}
{graph.error}
{:else} {#if sharedViewport && onViewportChange} {/if} { document.dispatchEvent(new Event('focus')) if (selectionManager.mode === 'normal') { selectionManager.clearSelection() } }} onpanecontextmenu={({ event }) => { paneContextMenu?.onPaneContextMenu(event) }} onnodedragstop={(event) => { const node = event.targetNode if (node && node.type === 'note') { onNotePositionUpdate?.(node.id, node.position) } }} onmove={(event, viewport) => { viewportSynchronizer?.handleLocalViewportChange(event, viewport) }} {nodes} {edges} {edgeTypes} {nodeTypes} {height} {width} minZoom={0.2} maxZoom={1.2} connectionLineType={ConnectionLineType.SmoothStep} defaultEdgeOptions={{ type: 'smoothstep' }} preventScrolling={scroll} selectionOnDrag={selectionManager.mode === 'rect-select'} elementsSelectable={true} selectionMode={SelectionMode.Partial} selectionKey={selectionManager.mode === 'rect-select' ? null : 'Meta'} panActivationKey={selectionManager.mode === 'rect-select' ? 'Meta' : null} panOnDrag={selectionManager.mode === 'rect-select' ? [1] : true} zoomOnDoubleClick={false} elevateNodesOnSelect={false} {proOptions} nodesDraggable={false} --background-color={false} >
{#if noteMode} {/if} {#if multiSelectEnabled} !id.startsWith('Settings') && !id.startsWith('Trigger') && !id.startsWith('Result') )} > selectionManager.selectedIds.includes(node.id))} /> {/if} {#if leftHeader}
{@render leftHeader()}
{:else} {#if multiSelectEnabled}
{ selectionManager.mode = selectionManager.mode === 'normal' ? 'rect-select' : 'normal' }} title="Toggle rectangle selection" class={selectionManager.mode === 'rect-select' ? 'text-accent !bg-surface-selected' : ''} >
{/if} {#if download} { try { localStorage.setItem( 'svelvet', encodeState({ modules, failureModule, preprocessorModule }) ) } catch (e) { console.error('error interacting with local storage', e) } window.open('/view_graph', '_blank') }} class="!bg-surface" > {/if}
{#if showDataflow} {/if} {/if}
{/if}