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>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -81,7 +81,9 @@ export function ProxmoxGroupNode(props: NodeProps<Node<NodeData>>) {
|
||||
</div>
|
||||
|
||||
<Handle type="source" position={Position.Top} className="!bg-[#30363d] !border-[#8b949e]" />
|
||||
<Handle type="target" position={Position.Top} className="!bg-[#30363d] !border-[#8b949e]" />
|
||||
<Handle type="source" position={Position.Bottom} className="!bg-[#30363d] !border-[#8b949e]" />
|
||||
<Handle type="target" position={Position.Bottom} className="!bg-[#30363d] !border-[#8b949e]" />
|
||||
|
||||
{/* Cluster handles — left/right for same-cluster links */}
|
||||
<Handle type="source" position={Position.Left} id="cluster-left" title="Same cluster" style={{ background: '#ff6e00', borderColor: '#ff6e0088', width: 6, height: 6 }} />
|
||||
|
||||
Reference in New Issue
Block a user