From 038bc6783d38e41fcc6913126a4573571c52a97b Mon Sep 17 00:00:00 2001 From: Guilhem Date: Wed, 4 Mar 2026 14:36:33 +0000 Subject: [PATCH] formatting --- .../lib/components/graph/FlowGraphV2.svelte | 21 +++++++++++++------ .../lib/components/graph/compoundLayout.ts | 7 ++----- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/frontend/src/lib/components/graph/FlowGraphV2.svelte b/frontend/src/lib/components/graph/FlowGraphV2.svelte index cedcfafbe5..7b88499485 100644 --- a/frontend/src/lib/components/graph/FlowGraphV2.svelte +++ b/frontend/src/lib/components/graph/FlowGraphV2.svelte @@ -361,8 +361,7 @@ }) // Center horizontally - const xCenter = - (fullSize ? fullWidth : width) / 2 - bbox.width / 2 - (width - fullWidth) / 2 + const xCenter = (fullSize ? fullWidth : width) / 2 - bbox.width / 2 - (width - fullWidth) / 2 const newNodes = nodes.map((n) => ({ id: n.id, position: { @@ -926,7 +925,12 @@ {#if moveManager} - + {/if} {#if sharedViewport && onViewportChange} - nodesWithOffset.some(n => n.id === id) + selectedNodes={selectionManager.selectedIds.filter((id) => + nodesWithOffset.some((n) => n.id === id) )} allNodes={nodesWithOffset as (Node & { type: string })[]} onDeleteSelected={() => onDeleteMultiple?.(resolvedModuleIds)} @@ -1012,7 +1016,12 @@ {@render leftHeader()} {:else} - n.type !== 'note') }}> + n.type !== 'note') }} + > {#if multiSelectEnabled}
diff --git a/frontend/src/lib/components/graph/compoundLayout.ts b/frontend/src/lib/components/graph/compoundLayout.ts index 1c294b06de..4bf3ddebda 100644 --- a/frontend/src/lib/components/graph/compoundLayout.ts +++ b/frontend/src/lib/components/graph/compoundLayout.ts @@ -341,12 +341,9 @@ function layoutLevel( if (isBranch) { // Place branches side by side horizontally - branchWidths = branchLayouts.map((bl) => - Math.max(bl.bbox.width, constants.nodeWidth) - ) + branchWidths = branchLayouts.map((bl) => Math.max(bl.bbox.width, constants.nodeWidth)) const gaps = Math.max(0, branchWidths.length - 1) * constants.gapH - totalWidth = - branchWidths.reduce((s, w) => s + w, 0) + gaps + totalWidth = branchWidths.reduce((s, w) => s + w, 0) + gaps wrapperWidth = Math.max(totalWidth, constants.nodeWidth) maxBranchHeight = Math.max(0, ...branchLayouts.map((bl) => bl.bbox.height))