This repository was archived by the owner on Nov 1, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
src/components/CodeViewer/example-flows Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -16,8 +16,8 @@ function getNodeIntersection(intersectionNode, targetNode) {
16
16
17
17
const x2 = intersectionNodePosition . x + w ;
18
18
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 ;
21
21
22
22
const xx1 = ( x1 - x2 ) / ( 2 * w ) - ( y1 - y2 ) / ( 2 * h ) ;
23
23
const yy1 = ( x1 - x2 ) / ( 2 * w ) + ( y1 - y2 ) / ( 2 * h ) ;
Original file line number Diff line number Diff line change @@ -16,8 +16,8 @@ function getNodeIntersection(intersectionNode, targetNode) {
16
16
17
17
const x2 = intersectionNodePosition . x + w ;
18
18
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 ;
21
21
22
22
const xx1 = ( x1 - x2 ) / ( 2 * w ) - ( y1 - y2 ) / ( 2 * h ) ;
23
23
const yy1 = ( x1 - x2 ) / ( 2 * w ) + ( y1 - y2 ) / ( 2 * h ) ;
You can’t perform that action at this time.
0 commit comments