diff --git a/src/components/ConnectionLine/ConnectionLine.vue b/src/components/ConnectionLine/ConnectionLine.vue index 58df160e..d5bdaa75 100644 --- a/src/components/ConnectionLine/ConnectionLine.vue +++ b/src/components/ConnectionLine/ConnectionLine.vue @@ -11,6 +11,7 @@ import { ConnectionMode, VFInternals, Transform, + GraphNode, } from '../../types' interface ConnectionLineProps { @@ -22,6 +23,7 @@ interface ConnectionLineProps { connectionHandleType?: HandleType connectionPosition?: XYPosition connectionMode: ConnectionMode + nodes: GraphNode[] transform: Transform } @@ -31,6 +33,7 @@ const props = withDefaults(defineProps(), { connectionPosition: () => ({ x: 0, y: 0 }), }) +const sourceNode = props.nodes.find((n) => n.id === props.connectionNodeId) const sourceHandle = props.connectionHandleId && props.connectionHandleType ? props.vf.handleBounds[props.connectionHandleType]?.find((d: HandleElement) => d.id === props.connectionHandleId) @@ -101,6 +104,9 @@ export default { targetPosition, connectionLineType: props.connectionLineType, connectionLineStyle: props.connectionLineStyle, + nodes: props.nodes, + sourceNode, + sourceHandle, }" > diff --git a/src/container/EdgeRenderer/EdgeRenderer.vue b/src/container/EdgeRenderer/EdgeRenderer.vue index 216d9e12..a7d8ff72 100644 --- a/src/container/EdgeRenderer/EdgeRenderer.vue +++ b/src/container/EdgeRenderer/EdgeRenderer.vue @@ -112,6 +112,7 @@ export default { :connection-handle-type="props.connectionHandleType" :connection-position="props.connectionPosition" :connection-mode="props.connectionMode" + :nodes="props.nodes" :transform="props.transform" >