diff --git a/packages/system/src/xyhandle/XYHandle.ts b/packages/system/src/xyhandle/XYHandle.ts index 4ecf0cce..1600c03d 100644 --- a/packages/system/src/xyhandle/XYHandle.ts +++ b/packages/system/src/xyhandle/XYHandle.ts @@ -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) {