diff --git a/src/frontend/src/CustomEdges/index.tsx b/src/frontend/src/CustomEdges/index.tsx index b7d38b5d9..59db2d38b 100644 --- a/src/frontend/src/CustomEdges/index.tsx +++ b/src/frontend/src/CustomEdges/index.tsx @@ -21,8 +21,8 @@ export function DefaultEdge({ const targetHandleObject = scapeJSONParse(targetHandleId!); const sourceXNew = - (sourceNode?.position.x ?? 0) + (sourceNode?.measured?.width ?? 0); - const targetXNew = targetNode?.position.x ?? 0; + (sourceNode?.position.x ?? 0) + (sourceNode?.measured?.width ?? 0) + 7; + const targetXNew = (targetNode?.position.x ?? 0) - 7; const distance = 200 + 0.1 * ((sourceXNew - targetXNew) / 2); @@ -42,15 +42,18 @@ export function DefaultEdge({ 200 * (1 - zeroOnNegative) + 0.3 * Math.abs(sourceY - targetY) * zeroOnNegative; - const edgePathLoop = `M ${sourceXNew} ${sourceY} C ${sourceXNew + distance} ${sourceY + sourceDistanceY}, ${targetXNew - distance} ${targetY + distanceY}, ${targetXNew} ${targetY}`; + const targetYNew = targetY + 1; + const sourceYNew = sourceY + 1; + + const edgePathLoop = `M ${sourceXNew} ${sourceYNew} C ${sourceXNew + distance} ${sourceYNew + sourceDistanceY}, ${targetXNew - distance} ${targetYNew + distanceY}, ${targetXNew} ${targetYNew}`; const [edgePath] = getBezierPath({ sourceX: sourceXNew, - sourceY, + sourceY: sourceYNew, sourcePosition: Position.Right, targetPosition: Position.Left, targetX: targetXNew, - targetY, + targetY: targetYNew, }); return ( diff --git a/src/frontend/src/CustomNodes/GenericNode/components/handleRenderComponent/index.tsx b/src/frontend/src/CustomNodes/GenericNode/components/handleRenderComponent/index.tsx index c93cab0ad..874989b66 100644 --- a/src/frontend/src/CustomNodes/GenericNode/components/handleRenderComponent/index.tsx +++ b/src/frontend/src/CustomNodes/GenericNode/components/handleRenderComponent/index.tsx @@ -52,7 +52,7 @@ const HandleContent = memo(function HandleContent({ styleSheet.textContent = ` @keyframes pulseNeon-${nodeId} { 0% { - box-shadow: 0 0 0 2px hsl(var(--node-ring)), + box-shadow: 0 0 0 3px hsl(var(--node-ring)), 0 0 2px ${handleColor}, 0 0 4px ${handleColor}, 0 0 6px ${handleColor}, @@ -62,7 +62,7 @@ const HandleContent = memo(function HandleContent({ 0 0 20px ${handleColor}; } 50% { - box-shadow: 0 0 0 2px hsl(var(--node-ring)), + box-shadow: 0 0 0 3px hsl(var(--node-ring)), 0 0 4px ${handleColor}, 0 0 8px ${handleColor}, 0 0 12px ${handleColor}, @@ -72,7 +72,7 @@ const HandleContent = memo(function HandleContent({ 0 0 30px ${handleColor}; } 100% { - box-shadow: 0 0 0 2px hsl(var(--node-ring)), + box-shadow: 0 0 0 3px hsl(var(--node-ring)), 0 0 2px ${handleColor}, 0 0 4px ${handleColor}, 0 0 6px ${handleColor},