fix for connection snapping when connection radius overlaps

This commit is contained in:
peterkogo
2024-07-01 12:01:30 +02:00
parent 00063ab925
commit 4b1541d3a5
+3
View File
@@ -172,6 +172,7 @@ function onPointerDown(
closestHandle &&
previousConnection.toHandle &&
newConnection.toHandle &&
previousConnection.toHandle.type === newConnection.toHandle.type &&
previousConnection.toHandle.nodeId === newConnection.toHandle.nodeId &&
previousConnection.toHandle.id === newConnection.toHandle.id
) {
@@ -278,6 +279,8 @@ function isValidHandle(
? (isTarget && handleType === 'source') || (!isTarget && handleType === 'target')
: handleNodeId !== fromNodeId || handleId !== fromHandleId);
console.log(isValid);
result.isValid = isValid && isValidConnection(connection);
if (handleLookup) {