Skip to content

Commit 7effd39

Browse files
committed
Fix height calculation: content and ports share vertical space
1 parent b0c7b39 commit 7effd39

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/lib/components/nodes/BaseNode.svelte

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,11 +160,12 @@
160160
))
161161
);
162162
163-
// Height: base + pinned params, or more for horizontal orientation with many ports
163+
// Height: total content height vs port requirements (they share vertical space)
164+
const contentHeight = $derived(NODE.baseHeight + pinnedParamsHeight);
164165
const nodeHeight = $derived(
165166
isVertical
166-
? snapTo2G(NODE.baseHeight + pinnedParamsHeight)
167-
: snapTo2G(Math.max(NODE.baseHeight, minPortDimension) + pinnedParamsHeight)
167+
? snapTo2G(contentHeight)
168+
: snapTo2G(Math.max(contentHeight, minPortDimension))
168169
);
169170
170171
// Check if this is a Subsystem or Interface node (using shapes utility)

0 commit comments

Comments
 (0)