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
+13
View File
@@ -248,6 +248,19 @@ export enum ConnectionLineType {
SmoothStep = 'smoothstep',
}
export type ConnectionLineComponentProps = {
sourceX: number;
sourceY: number;
sourcePosition?: Position;
targetX: number;
targetY: number;
targetPosition?: Position;
connectionLineStyle?: CSSProperties;
connectionLineType: ConnectionLineType;
};
export type ConnectionLineComponent = React.ComponentType<ConnectionLineComponentProps>;
export type OnConnectFunc = (connection: Connection) => void;
export type OnConnectStartParams = {
nodeId: ElementId | null;