Skip to content
This repository was archived by the owner on Nov 1, 2023. It is now read-only.

Commit 00aca18

Browse files
committed
chore(examples): update floating edges and easy connect
1 parent 377e72d commit 00aca18

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/components/CodeViewer/example-flows/EasyConnect/utils.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ function getNodeIntersection(intersectionNode, targetNode) {
1616

1717
const x2 = intersectionNodePosition.x + w;
1818
const y2 = intersectionNodePosition.y + h;
19-
const x1 = targetPosition.x + w;
20-
const y1 = targetPosition.y + h;
19+
const x1 = targetPosition.x + targetNode.width / 2;
20+
const y1 = targetPosition.y + targetNode.height / 2;
2121

2222
const xx1 = (x1 - x2) / (2 * w) - (y1 - y2) / (2 * h);
2323
const yy1 = (x1 - x2) / (2 * w) + (y1 - y2) / (2 * h);

src/components/CodeViewer/example-flows/FloatingEdges/utils.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ function getNodeIntersection(intersectionNode, targetNode) {
1616

1717
const x2 = intersectionNodePosition.x + w;
1818
const y2 = intersectionNodePosition.y + h;
19-
const x1 = targetPosition.x + w;
20-
const y1 = targetPosition.y + h;
19+
const x1 = targetPosition.x + targetNode.width / 2;
20+
const y1 = targetPosition.y + targetNode.height / 2;
2121

2222
const xx1 = (x1 - x2) / (2 * w) - (y1 - y2) / (2 * h);
2323
const yy1 = (x1 - x2) / (2 * w) + (y1 - y2) / (2 * h);

0 commit comments

Comments
 (0)