fix for connection snapping when connection radius overlaps
This commit is contained in:
@@ -172,6 +172,7 @@ function onPointerDown(
|
|||||||
closestHandle &&
|
closestHandle &&
|
||||||
previousConnection.toHandle &&
|
previousConnection.toHandle &&
|
||||||
newConnection.toHandle &&
|
newConnection.toHandle &&
|
||||||
|
previousConnection.toHandle.type === newConnection.toHandle.type &&
|
||||||
previousConnection.toHandle.nodeId === newConnection.toHandle.nodeId &&
|
previousConnection.toHandle.nodeId === newConnection.toHandle.nodeId &&
|
||||||
previousConnection.toHandle.id === newConnection.toHandle.id
|
previousConnection.toHandle.id === newConnection.toHandle.id
|
||||||
) {
|
) {
|
||||||
@@ -278,6 +279,8 @@ function isValidHandle(
|
|||||||
? (isTarget && handleType === 'source') || (!isTarget && handleType === 'target')
|
? (isTarget && handleType === 'source') || (!isTarget && handleType === 'target')
|
||||||
: handleNodeId !== fromNodeId || handleId !== fromHandleId);
|
: handleNodeId !== fromNodeId || handleId !== fromHandleId);
|
||||||
|
|
||||||
|
console.log(isValid);
|
||||||
|
|
||||||
result.isValid = isValid && isValidConnection(connection);
|
result.isValid = isValid && isValidConnection(connection);
|
||||||
|
|
||||||
if (handleLookup) {
|
if (handleLookup) {
|
||||||
|
|||||||
Reference in New Issue
Block a user