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:
@@ -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>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user