Skip to content

Commit 8943ec7

Browse files
committed
fix(core): vertically or horizontally aligned nodes
1 parent 77ccc7e commit 8943ec7

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

packages/core/src/components/Edges/utils/smoothstep.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,13 @@ function getPoints({
150150
centerY = points[0].y
151151
}
152152

153-
const pathPoints = [source, sourceGapped, ...points, targetGapped, target]
153+
const pathPoints = [
154+
source,
155+
{ x: sourceGapped.x - sourceGapOffset.x, y: sourceGapped.y - sourceGapOffset.y },
156+
...points,
157+
{ x: targetGapped.x - targetGapOffset.x, y: targetGapped.y - targetGapOffset.y },
158+
target,
159+
]
154160

155161
return [pathPoints, centerX, centerY, defaultOffsetX, defaultOffsetY]
156162
}

0 commit comments

Comments
 (0)