implemented new fitView logic
This commit is contained in:
@@ -50,7 +50,32 @@ function createStraightEdge(params: { isInternal: boolean }) {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Component that can be used inside a custom edge to render a straight line.
|
||||
*
|
||||
* @public
|
||||
* @example
|
||||
*
|
||||
* ```tsx
|
||||
* import { StraightEdge } from '@xyflow/react';
|
||||
*
|
||||
* function CustomEdge({ sourceX, sourceY, targetX, targetY }) {
|
||||
* return (
|
||||
* <StraightEdge
|
||||
* sourceX={sourceX}
|
||||
* sourceY={sourceY}
|
||||
* targetX={targetX}
|
||||
* targetY={targetY}
|
||||
* />
|
||||
* );
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
const StraightEdge = createStraightEdge({ isInternal: false });
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
const StraightEdgeInternal = createStraightEdge({ isInternal: true });
|
||||
|
||||
StraightEdge.displayName = 'StraightEdge';
|
||||
|
||||
Reference in New Issue
Block a user