Skip to content

Commit c9d643d

Browse files
committed
fix(edges): set source and target position on edge obj
Signed-off-by: braks <[email protected]>
1 parent b21c16d commit c9d643d

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

packages/core/src/components/Edges/EdgeWrapper.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,11 @@ const EdgeWrapper = defineComponent({
104104
targetPosition,
105105
)
106106

107+
edge.sourceX = sourceX
108+
edge.sourceY = sourceY
109+
edge.targetX = targetX
110+
edge.targetY = targetY
111+
107112
return h(
108113
'g',
109114
{

packages/core/src/store/actions.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -499,6 +499,7 @@ export function useActions(state: State, getters: ComputedGetters): Actions {
499499
return [nodeRect, node, isRectObj]
500500
}
501501

502+
// todo: rename to `findIntersectingNodes`
502503
const getIntersectingNodes: Actions['getIntersectingNodes'] = (nodeOrRect, partially = true, nodes) => {
503504
const [nodeRect, node, isRect] = getNodeRect(nodeOrRect)
504505

packages/core/src/types/flow.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,13 @@ export enum Position {
6666
Bottom = 'bottom',
6767
}
6868

69+
// todo: Rename to `Point`
6970
export interface XYPosition {
7071
x: number
7172
y: number
7273
}
7374

75+
// todo: Rename to `AbsolutePoint`
7476
export type XYZPosition = XYPosition & { z: number }
7577

7678
export interface Dimensions {

0 commit comments

Comments
 (0)