fix(core): handle pos calculation
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
import { getEventPosition, getHandlePosition } from '.'
|
import { getEventPosition } from '.'
|
||||||
import { ConnectionMode } from '~/types'
|
import { ConnectionMode } from '~/types'
|
||||||
import type {
|
import type {
|
||||||
Actions,
|
Actions,
|
||||||
@@ -48,14 +48,8 @@ export function getHandles(
|
|||||||
id: h.id || null,
|
id: h.id || null,
|
||||||
type,
|
type,
|
||||||
nodeId: node.id,
|
nodeId: node.id,
|
||||||
...getHandlePosition(
|
x: (node.computedPosition?.x ?? 0) + h.x + h.width / 2,
|
||||||
h.position,
|
y: (node.computedPosition?.y ?? 0) + h.y + h.height / 2,
|
||||||
{
|
|
||||||
...node.dimensions,
|
|
||||||
...node.computedPosition,
|
|
||||||
},
|
|
||||||
h,
|
|
||||||
),
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
return res
|
return res
|
||||||
|
|||||||
Reference in New Issue
Block a user