Merge pull request #4343 from xyflow/fix-edge-type-path-options
added straight edge to path built-in-types
This commit is contained in:
@@ -60,7 +60,9 @@ type StepEdge<EdgeData extends Record<string, unknown> = Record<string, unknown>
|
|||||||
pathOptions?: StepPathOptions;
|
pathOptions?: StepPathOptions;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type BuiltInEdge = SmoothStepEdge | BezierEdge | StepEdge;
|
type StraightEdge<EdgeData extends Record<string, unknown> = Record<string, unknown>> = Edge<EdgeData, 'straight'>;
|
||||||
|
|
||||||
|
export type BuiltInEdge = SmoothStepEdge | BezierEdge | StepEdge | StraightEdge;
|
||||||
|
|
||||||
export type EdgeMouseHandler<EdgeType extends Edge = Edge> = (event: ReactMouseEvent, edge: EdgeType) => void;
|
export type EdgeMouseHandler<EdgeType extends Edge = Edge> = (event: ReactMouseEvent, edge: EdgeType) => void;
|
||||||
|
|
||||||
|
|||||||
@@ -44,7 +44,12 @@ type StepEdge<EdgeData extends Record<string, unknown> = Record<string, unknown>
|
|||||||
pathOptions?: StepPathOptions;
|
pathOptions?: StepPathOptions;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type BuiltInEdge = SmoothStepEdge | BezierEdge | StepEdge;
|
type StraightEdge<EdgeData extends Record<string, unknown> = Record<string, unknown>> = Edge<
|
||||||
|
EdgeData,
|
||||||
|
'straight'
|
||||||
|
>;
|
||||||
|
|
||||||
|
export type BuiltInEdge = SmoothStepEdge | BezierEdge | StepEdge | StraightEdge;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Custom edge component props.
|
* Custom edge component props.
|
||||||
|
|||||||
Reference in New Issue
Block a user