refactor(core): calculate correct handle pos in handle lookup (#1494)

* refactor(core): use `getHandlePosition` to calculate handle pos

* chore(changeset): add
This commit is contained in:
Braks
2024-07-01 09:44:55 +02:00
parent e435485b77
commit 09e222124c
5 changed files with 32 additions and 34 deletions
@@ -74,11 +74,7 @@ const ConnectionLine = defineComponent({
const fromHandle = (startHandleId ? handleBounds.find((d) => d.id === startHandleId) : handleBounds[0]) ?? null
const fromPosition = fromHandle?.position || Position.Top
const { x: fromX, y: fromY } = getHandlePosition(
fromPosition,
{ ...fromNode.value.dimensions, ...fromNode.value.computedPosition },
fromHandle,
)
const { x: fromX, y: fromY } = getHandlePosition(fromPosition, fromNode.value, fromHandle)
let toHandle: HandleElement | null = null
if (toNode.value && connectionEndHandle.value?.handleId) {