Use correct end handle position when drawing a connection (#4382)
* use correct end handle position \when drawing connection lines * provide correct connection end handle, also when connection is invalid * add end handle position to connection despite being invalid * chore(connectionline): remove logs --------- Co-authored-by: moklick <info@moritzklack.com>
This commit is contained in:
@@ -41,7 +41,7 @@ const CustomInput: FC<NodeProps> = () => (
|
||||
|
||||
const CustomNode: FC<NodeProps> = ({ id }) => (
|
||||
<>
|
||||
<Handle type="target" position={Position.Left} isConnectableStart={false} />
|
||||
<Handle type="target" position={Position.Top} isConnectableStart={false} />
|
||||
<div>{id}</div>
|
||||
<Handle type="source" position={Position.Right} />
|
||||
</>
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
data: { label: 'only connectable with B' },
|
||||
...nodeDefaults
|
||||
},
|
||||
{ id: 'A', position: { x: 250, y: 0 }, data: { label: 'A' }, ...nodeDefaults },
|
||||
{ id: 'B', position: { x: 250, y: 150 }, data: { label: 'B' }, ...nodeDefaults },
|
||||
{ id: 'A', position: { x: 250, y: 0 }, data: { label: 'A' } },
|
||||
{ id: 'B', position: { x: 250, y: 150 }, data: { label: 'B' } },
|
||||
{ id: 'C', position: { x: 250, y: 300 }, data: { label: 'C' }, ...nodeDefaults }
|
||||
]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user