diff --git a/.gitignore b/.gitignore index 0de53e00..0dfd9461 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,5 @@ cypress/screenshots dist .env stats.html -.eslintcache \ No newline at end of file +.eslintcache +.idea diff --git a/src/components/Edges/SmoothStepEdge.tsx b/src/components/Edges/SmoothStepEdge.tsx index 82f70bdd..0c42410a 100644 --- a/src/components/Edges/SmoothStepEdge.tsx +++ b/src/components/Edges/SmoothStepEdge.tsx @@ -73,6 +73,12 @@ export function getSmoothStepPath({ sourceY <= targetY ? rightTopCorner(cX, sourceY, cornerSize) : rightBottomCorner(cX, sourceY, cornerSize); secondCornerPath = sourceY <= targetY ? bottomLeftCorner(cX, targetY, cornerSize) : topLeftCorner(cX, targetY, cornerSize); + } else if (sourcePosition === Position.Right && targetPosition === Position.Left){ + // and sourceX > targetX + firstCornerPath = + sourceY <= targetY ? leftTopCorner(cX, sourceY, cornerSize) : leftBottomCorner(cX, sourceY, cornerSize); + secondCornerPath = + sourceY <= targetY ? bottomRightCorner(cX, targetY, cornerSize) : topRightCorner(cX, targetY, cornerSize); } } else if (leftAndRight.includes(sourcePosition) && !leftAndRight.includes(targetPosition)) { if (sourceX <= targetX) {