fix: add source+target handles at top and bottom so all snatch points work

connectionMode=loose alone does not reliably make source handles act as
drop targets. Each position now has both a source handle (to initiate
drag) and a target handle (to receive drops). They overlap visually as
one dot but support full bidirectional connections.
This commit is contained in:
Pouzor
2026-03-08 12:26:21 +01:00
parent 3e1edd9458
commit be18bcc6d9
2 changed files with 4 additions and 0 deletions
@@ -39,6 +39,7 @@ export function BaseNode({ data, selected, icon: typeIcon }: BaseNodeProps) {
}}
>
<Handle type="source" position={Position.Top} className="!bg-[#30363d] !border-[#8b949e]" />
<Handle type="target" position={Position.Top} className="!bg-[#30363d] !border-[#8b949e]" />
{/* Icon */}
<div
@@ -68,6 +69,7 @@ export function BaseNode({ data, selected, icon: typeIcon }: BaseNodeProps) {
/>
<Handle type="source" position={Position.Bottom} className="!bg-[#30363d] !border-[#8b949e]" />
<Handle type="target" position={Position.Bottom} className="!bg-[#30363d] !border-[#8b949e]" />
</div>
)
}