From b7e63c17e72395f02148e17b5d9fa12cce830562 Mon Sep 17 00:00:00 2001 From: DiamondDrake Date: Tue, 20 Jul 2021 15:39:11 -0400 Subject: [PATCH 1/2] 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 bb9161bb..e3c71f9e 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 96247795..2e1cca1c 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; From d51d677106222bc442297e942356e83680d0a243 Mon Sep 17 00:00:00 2001 From: DiamondDrake Date: Tue, 20 Jul 2021 15:43:28 -0400 Subject: [PATCH 2/2] removed copy pasta null --- src/types/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/types/index.ts b/src/types/index.ts index 2e1cca1c..8006aa1a 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -303,7 +303,7 @@ export type ConnectionLineComponentProps = { targetPosition?: Position; connectionLineStyle?: CSSProperties; connectionLineType: ConnectionLineType; - sourceNode?: Node | null; + sourceNode?: Node; sourceHandle?: HandleElement; };