Skip to content

Commit 3fa7049

Browse files
committed
Hide output port controls for syncPorts blocks in BaseNode
1 parent 69fdece commit 3fa7049

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/lib/components/nodes/BaseNode.svelte

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@
8989
// Check if this node allows dynamic ports
9090
const allowsDynamicInputs = $derived(typeDef?.ports.maxInputs === null);
9191
const allowsDynamicOutputs = $derived(typeDef?.ports.maxOutputs === null);
92+
const syncPorts = $derived(typeDef?.ports.syncPorts ?? false);
9293
9394
// Rotation state (0, 1, 2, 3 = 0°, 90°, 180°, 270°) - stored in node params
9495
const rotation = $derived((data.params?.['_rotation'] as number) || 0);
@@ -348,8 +349,8 @@
348349
</div>
349350
{/if}
350351

351-
<!-- Port controls for dynamic outputs (only show when selected) -->
352-
{#if allowsDynamicOutputs && selected}
352+
<!-- Port controls for dynamic outputs (only show when selected, hide for syncPorts blocks) -->
353+
{#if allowsDynamicOutputs && selected && !syncPorts}
353354
<div class="port-controls port-controls-output" class:port-controls-right={rotation === 0} class:port-controls-bottom={rotation === 1} class:port-controls-left={rotation === 2} class:port-controls-top={rotation === 3}>
354355
<button class="port-btn" onclick={handleAddOutput} ondblclick={(e) => e.stopPropagation()} title="Add output">+</button>
355356
<button class="port-btn" onclick={handleRemoveOutput} ondblclick={(e) => e.stopPropagation()} disabled={data.outputs.length <= minOutputs} title="Remove output">-</button>

0 commit comments

Comments
 (0)