fix(edges): set source and target position on edge obj

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
braks
2023-03-12 15:19:15 +01:00
committed by Braks
parent b21c16de39
commit c9d643d700
3 changed files with 8 additions and 0 deletions

View File

@@ -104,6 +104,11 @@ const EdgeWrapper = defineComponent({
targetPosition,
)
edge.sourceX = sourceX
edge.sourceY = sourceY
edge.targetX = targetX
edge.targetY = targetY
return h(
'g',
{

View File

@@ -499,6 +499,7 @@ export function useActions(state: State, getters: ComputedGetters): Actions {
return [nodeRect, node, isRectObj]
}
// todo: rename to `findIntersectingNodes`
const getIntersectingNodes: Actions['getIntersectingNodes'] = (nodeOrRect, partially = true, nodes) => {
const [nodeRect, node, isRect] = getNodeRect(nodeOrRect)

View File

@@ -66,11 +66,13 @@ export enum Position {
Bottom = 'bottom',
}
// todo: Rename to `Point`
export interface XYPosition {
x: number
y: number
}
// todo: Rename to `AbsolutePoint`
export type XYZPosition = XYPosition & { z: number }
export interface Dimensions {