Merge pull request #5257 from xyflow/chore/react-onreconnect
Chore/react onreconnect
This commit is contained in:
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'@xyflow/react': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Use OnReconnect from system
|
||||||
@@ -107,6 +107,7 @@ export {
|
|||||||
type ConnectionInProgress,
|
type ConnectionInProgress,
|
||||||
type NoConnection,
|
type NoConnection,
|
||||||
type NodeConnection,
|
type NodeConnection,
|
||||||
|
type OnReconnect,
|
||||||
} from '@xyflow/system';
|
} from '@xyflow/system';
|
||||||
|
|
||||||
// we need this workaround to prevent a duplicate identifier error
|
// we need this workaround to prevent a duplicate identifier error
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ import type {
|
|||||||
OnError,
|
OnError,
|
||||||
ColorMode,
|
ColorMode,
|
||||||
SnapGrid,
|
SnapGrid,
|
||||||
|
OnReconnect,
|
||||||
} from '@xyflow/system';
|
} from '@xyflow/system';
|
||||||
|
|
||||||
import type {
|
import type {
|
||||||
@@ -29,7 +30,6 @@ import type {
|
|||||||
Node,
|
Node,
|
||||||
Edge,
|
Edge,
|
||||||
ConnectionLineComponent,
|
ConnectionLineComponent,
|
||||||
OnReconnect,
|
|
||||||
OnInit,
|
OnInit,
|
||||||
DefaultEdgeOptions,
|
DefaultEdgeOptions,
|
||||||
FitViewOptions,
|
FitViewOptions,
|
||||||
|
|||||||
@@ -8,12 +8,12 @@ import type {
|
|||||||
SmoothStepPathOptions,
|
SmoothStepPathOptions,
|
||||||
DefaultEdgeOptionsBase,
|
DefaultEdgeOptionsBase,
|
||||||
HandleType,
|
HandleType,
|
||||||
Connection,
|
|
||||||
ConnectionLineType,
|
ConnectionLineType,
|
||||||
Handle,
|
Handle,
|
||||||
EdgePosition,
|
EdgePosition,
|
||||||
StepPathOptions,
|
StepPathOptions,
|
||||||
OnError,
|
OnError,
|
||||||
|
OnReconnect,
|
||||||
FinalConnectionState,
|
FinalConnectionState,
|
||||||
} from '@xyflow/system';
|
} from '@xyflow/system';
|
||||||
|
|
||||||
@@ -233,8 +233,6 @@ export type StraightEdgeProps = Omit<EdgeComponentProps, 'sourcePosition' | 'tar
|
|||||||
*/
|
*/
|
||||||
export type SimpleBezierEdgeProps = EdgeComponentProps;
|
export type SimpleBezierEdgeProps = EdgeComponentProps;
|
||||||
|
|
||||||
export type OnReconnect<EdgeType extends Edge = Edge> = (oldEdge: EdgeType, newConnection: Connection) => void;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If you want to render a custom component for connection lines, you can set the
|
* If you want to render a custom component for connection lines, you can set the
|
||||||
* `connectionLineComponent` prop on the [`<ReactFlow />`](/api-reference/react-flow#connection-connectionLineComponent)
|
* `connectionLineComponent` prop on the [`<ReactFlow />`](/api-reference/react-flow#connection-connectionLineComponent)
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ export type OnConnect = (connection: Connection) => void;
|
|||||||
export type OnConnectEnd = (event: MouseEvent | TouchEvent, connectionState: FinalConnectionState) => void;
|
export type OnConnectEnd = (event: MouseEvent | TouchEvent, connectionState: FinalConnectionState) => void;
|
||||||
|
|
||||||
export type OnReconnect<EdgeType extends EdgeBase = EdgeBase> = (oldEdge: EdgeType, newConnection: Connection) => void;
|
export type OnReconnect<EdgeType extends EdgeBase = EdgeBase> = (oldEdge: EdgeType, newConnection: Connection) => void;
|
||||||
export type OnRecoonnectStart<EdgeType extends EdgeBase = EdgeBase> = (
|
export type OnReconnectStart<EdgeType extends EdgeBase = EdgeBase> = (
|
||||||
event: MouseEvent | TouchEvent,
|
event: MouseEvent | TouchEvent,
|
||||||
edge: EdgeType,
|
edge: EdgeType,
|
||||||
handleType: HandleType
|
handleType: HandleType
|
||||||
|
|||||||
Reference in New Issue
Block a user