mouseEvents.handleMouseMove(ev)} onmouseup={(ev) => mouseEvents.handleMouseUp(ev)} />
mouseEvents.handleMouseScroll(ev)} bind:this={graphState.wrapper} class="graph-wrapper" class:is-panning={graphState.isPanning} class:is-hovering={graphState.hoveredNodeId !== -1} aria-label="Graph" role="button" tabindex="0" bind:clientWidth={graphState.width} bind:clientHeight={graphState.height} onkeydown={(ev) => keymap.handleKeyboardEvent(ev)} onmousedown={(ev) => mouseEvents.handleMouseDown(ev)} {...fileDropEvents.getEventListenerProps()} > fileDropEvents.handleDragEnd(ev)} ondragleave={(ev) => fileDropEvents.handleDragEnd(ev)} /> {#if graphState.showGrid !== false} {/if} {#if graphState.boxSelection && graphState.mouseDown} {/if} {#if graph.status === "idle"} {#if graphState.addMenuPosition} {/if} {#if graphState.activeSocket} {/if} {#each graph.edges as edge} {@const [x1, y1, x2, y2] = getEdgePosition(edge)} {/each}
{#each graph.nodes.values() as node (node.id)} {/each}
{:else if graph.status === "loading"} Loading {:else if graph.status === "error"} Error {/if}
{#if graphState.showHelp} {/if}