diff --git a/frontend/src/lib/components/graph/SelectionBoundingBox.svelte b/frontend/src/lib/components/graph/SelectionBoundingBox.svelte index f7cd419435..e0723b5110 100644 --- a/frontend/src/lib/components/graph/SelectionBoundingBox.svelte +++ b/frontend/src/lib/components/graph/SelectionBoundingBox.svelte @@ -20,11 +20,13 @@ const { minX, minY, maxX, maxY } = calculateNodesBounds(selectedNodes) // Add padding in flow coordinates + + const padding = 4 const flowBounds = { - x: minX - 10, - y: minY - 10, - width: maxX - minX + 20, - height: maxY - minY + 20 + x: minX - padding, + y: minY - padding, + width: maxX - minX + 2 * padding, + height: maxY - minY + 2 * padding } // Convert to screen coordinates relative to the SvelteFlow container @@ -59,7 +61,7 @@ {#if bounds() && selectedNodes.length > 1} {@const currentBounds = bounds()!}