From 0e803839d65ea11b6ee64a60278de09c7bf223bc Mon Sep 17 00:00:00 2001 From: Braks <78412429+bcakmakoglu@users.noreply.github.com> Date: Tue, 23 Nov 2021 13:58:20 +0100 Subject: [PATCH] feat(BezierEdge): use quadratic bezier curve for top-left and bottom-right edges Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com> --- src/components/Edges/utils.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Edges/utils.ts b/src/components/Edges/utils.ts index bc31448f..94580130 100644 --- a/src/components/Edges/utils.ts +++ b/src/components/Edges/utils.ts @@ -85,9 +85,9 @@ export function getBezierPath({ if (leftAndRight.includes(sourcePosition) && leftAndRight.includes(targetPosition)) { path = `M${sourceX},${sourceY} C${cX},${sourceY} ${cX},${targetY} ${targetX},${targetY}` } else if (leftAndRight.includes(targetPosition)) { - path = `M${sourceX},${sourceY} C${sourceX},${targetY} ${sourceX},${targetY} ${targetX},${targetY}` + path = `M${sourceX},${sourceY} Q${sourceX},${targetY} ${sourceX},${targetY} ${targetX},${targetY}` } else if (leftAndRight.includes(sourcePosition)) { - path = `M${sourceX},${sourceY} C${targetX},${sourceY} ${targetX},${sourceY} ${targetX},${targetY}` + path = `M${sourceX},${sourceY} Q${targetX},${sourceY} ${targetX},${sourceY} ${targetX},${targetY}` } return path