Skip to content

Commit

Permalink
Extend Connection Line props
Browse files Browse the repository at this point in the history
Include Node and Handle in props passed to custom connection lines for advanced usage.
  • Loading branch information
RickeyWard committed Jul 20, 2021
1 parent 037c44e commit b7e63c1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/ConnectionLine/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ export default ({
targetPosition={targetPosition}
connectionLineType={connectionLineType}
connectionLineStyle={connectionLineStyle}
sourceNode={sourceNode}
sourceHandle={sourceHandle}
/>
</g>
);
Expand Down
2 changes: 2 additions & 0 deletions src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,8 @@ export type ConnectionLineComponentProps = {
targetPosition?: Position;
connectionLineStyle?: CSSProperties;
connectionLineType: ConnectionLineType;
sourceNode?: Node | null;
sourceHandle?: HandleElement;
};

export type ConnectionLineComponent = React.ComponentType<ConnectionLineComponentProps>;
Expand Down

0 comments on commit b7e63c1

Please sign in to comment.