feat(connectionline): custom component option #516

This commit is contained in:
moklick
2020-09-19 13:38:40 +02:00
parent 43e9461776
commit 1f7d88fd5e
10 changed files with 142 additions and 24 deletions
+4
View File
@@ -26,6 +26,7 @@ import {
Edge,
Connection,
ConnectionLineType,
ConnectionLineComponent,
FlowTransform,
OnConnectStartFunc,
OnConnectStopFunc,
@@ -65,6 +66,7 @@ export interface ReactFlowProps extends Omit<HTMLAttributes<HTMLDivElement>, 'on
edgeTypes: EdgeTypesType;
connectionLineType: ConnectionLineType;
connectionLineStyle?: CSSProperties;
connectionLineComponent?: ConnectionLineComponent;
deleteKeyCode: number;
selectionKeyCode: number;
snapToGrid: boolean;
@@ -116,6 +118,7 @@ const ReactFlow = ({
onSelectionContextMenu,
connectionLineType,
connectionLineStyle,
connectionLineComponent,
deleteKeyCode,
selectionKeyCode,
snapToGrid,
@@ -162,6 +165,7 @@ const ReactFlow = ({
edgeTypes={edgeTypesParsed}
connectionLineType={connectionLineType}
connectionLineStyle={connectionLineStyle}
connectionLineComponent={connectionLineComponent}
selectionKeyCode={selectionKeyCode}
onElementsRemove={onElementsRemove}
deleteKeyCode={deleteKeyCode}