Skip to content

Commit 9d3c358

Browse files
committed
fix(core): handle pos calculation
1 parent 7cd4ed8 commit 9d3c358

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

packages/core/src/utils/handle.ts

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { getEventPosition, getHandlePosition } from '.'
1+
import { getEventPosition } from '.'
22
import { ConnectionMode } from '~/types'
33
import type {
44
Actions,
@@ -48,14 +48,8 @@ export function getHandles(
4848
id: h.id || null,
4949
type,
5050
nodeId: node.id,
51-
...getHandlePosition(
52-
h.position,
53-
{
54-
...node.dimensions,
55-
...node.computedPosition,
56-
},
57-
h,
58-
),
51+
x: (node.computedPosition?.x ?? 0) + h.x + h.width / 2,
52+
y: (node.computedPosition?.y ?? 0) + h.y + h.height / 2,
5953
})
6054
}
6155
return res

0 commit comments

Comments
 (0)