Extend Connection Line props

Include Node and Handle in props passed to custom connection lines for advanced usage.
This commit is contained in:
DiamondDrake
2021-07-20 15:39:11 -04:00
parent 037c44ed6a
commit b7e63c17e7
2 changed files with 4 additions and 0 deletions
+2
View File
@@ -79,6 +79,8 @@ export default ({
targetPosition={targetPosition}
connectionLineType={connectionLineType}
connectionLineStyle={connectionLineStyle}
sourceNode={sourceNode}
sourceHandle={sourceHandle}
/>
</g>
);
+2
View File
@@ -303,6 +303,8 @@ export type ConnectionLineComponentProps = {
targetPosition?: Position;
connectionLineStyle?: CSSProperties;
connectionLineType: ConnectionLineType;
sourceNode?: Node | null;
sourceHandle?: HandleElement;
};
export type ConnectionLineComponent = React.ComponentType<ConnectionLineComponentProps>;