File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
packages/core/src/components/ConnectionLine Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -45,11 +45,11 @@ const ConnectionLine = defineComponent({
45
45
return null
46
46
}
47
47
48
- const handleId = connectionStartHandle . value . handleId
48
+ const startHandleId = connectionStartHandle . value . handleId
49
49
50
50
const handleType = connectionStartHandle . value . type
51
51
52
- const targetNode = ( connectionEndHandle . value ?. handleId && findNode ( connectionEndHandle . value . nodeId ) ) || null
52
+ const targetNode = ( connectionEndHandle . value && findNode ( connectionEndHandle . value . nodeId ) ) || null
53
53
54
54
const toX = ( connectionPosition . value . x - viewport . value . x ) / viewport . value . zoom
55
55
const toY = ( connectionPosition . value . y - viewport . value . y ) / viewport . value . zoom
@@ -65,14 +65,15 @@ const ConnectionLine = defineComponent({
65
65
return null
66
66
}
67
67
68
- const fromHandle = ( handleId ? handleBounds . find ( ( d ) => d . id === handleId ) : handleBounds [ 0 ] ) ?? null
68
+ const fromHandle = ( startHandleId ? handleBounds . find ( ( d ) => d . id === startHandleId ) : handleBounds [ 0 ] ) ?? null
69
69
const fromPosition = fromHandle ?. position || Position . Top
70
70
const { x : fromX , y : fromY } = getHandlePosition (
71
71
fromPosition ,
72
72
{ ...fromNode . dimensions , ...fromNode . computedPosition } ,
73
73
fromHandle ,
74
74
)
75
75
76
+ // todo: this is a bit of a mess, we should refactor this
76
77
const toHandle =
77
78
( targetNode &&
78
79
connectionEndHandle . value ?. handleId &&
You can’t perform that action at this time.
0 commit comments