From 9d3c3584ff477fa61ecc0a020e0a46cb78bac5dd Mon Sep 17 00:00:00 2001 From: braks <78412429+bcakmakoglu@users.noreply.github.com> Date: Thu, 15 Jun 2023 21:02:18 +0200 Subject: [PATCH] fix(core): handle pos calculation --- packages/core/src/utils/handle.ts | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/packages/core/src/utils/handle.ts b/packages/core/src/utils/handle.ts index bc840246..67a42c7e 100644 --- a/packages/core/src/utils/handle.ts +++ b/packages/core/src/utils/handle.ts @@ -1,4 +1,4 @@ -import { getEventPosition, getHandlePosition } from '.' +import { getEventPosition } from '.' import { ConnectionMode } from '~/types' import type { Actions, @@ -48,14 +48,8 @@ export function getHandles( id: h.id || null, type, nodeId: node.id, - ...getHandlePosition( - h.position, - { - ...node.dimensions, - ...node.computedPosition, - }, - h, - ), + x: (node.computedPosition?.x ?? 0) + h.x + h.width / 2, + y: (node.computedPosition?.y ?? 0) + h.y + h.height / 2, }) } return res