From b7e63c17e72395f02148e17b5d9fa12cce830562 Mon Sep 17 00:00:00 2001 From: DiamondDrake Date: Tue, 20 Jul 2021 15:39:11 -0400 Subject: [PATCH] Extend Connection Line props Include Node and Handle in props passed to custom connection lines for advanced usage. --- src/components/ConnectionLine/index.tsx | 2 ++ src/types/index.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/components/ConnectionLine/index.tsx b/src/components/ConnectionLine/index.tsx index bb9161bb4..e3c71f9e3 100644 --- a/src/components/ConnectionLine/index.tsx +++ b/src/components/ConnectionLine/index.tsx @@ -79,6 +79,8 @@ export default ({ targetPosition={targetPosition} connectionLineType={connectionLineType} connectionLineStyle={connectionLineStyle} + sourceNode={sourceNode} + sourceHandle={sourceHandle} /> ); diff --git a/src/types/index.ts b/src/types/index.ts index 962477955..2e1cca1ca 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -303,6 +303,8 @@ export type ConnectionLineComponentProps = { targetPosition?: Position; connectionLineStyle?: CSSProperties; connectionLineType: ConnectionLineType; + sourceNode?: Node | null; + sourceHandle?: HandleElement; }; export type ConnectionLineComponent = React.ComponentType;