feat(nodes): connect on touch device

This commit is contained in:
moklick
2021-12-17 10:35:53 +01:00
parent 639aa1ee23
commit 3b25086149
8 changed files with 136 additions and 7 deletions
+3 -1
View File
@@ -5,7 +5,7 @@ import { XYPosition, Rect, Transform, CoordinateExtent } from './utils';
import { NodeChange, EdgeChange } from './changes';
import { Node, NodeInternals, NodeDimensionUpdate, NodeDiffUpdate } from './nodes';
import { Edge } from './edges';
import { HandleType } from './handles';
import { HandleType, StartHandle } from './handles';
export type FlowElement<T = any> = Node<T> | Edge<T>;
@@ -178,6 +178,8 @@ export type ReactFlowStore = {
fitViewOnInit: boolean;
fitViewOnInitDone: boolean;
connectionStartHandle: StartHandle | null;
onConnect?: OnConnect;
onConnectStart?: OnConnectStart;
onConnectStop?: OnConnectStop;
+6
View File
@@ -8,6 +8,12 @@ export interface HandleElement extends XYPosition, Dimensions {
position: Position;
}
export interface StartHandle {
nodeId: string;
type: HandleType;
handleId?: string | null;
}
export interface HandleProps {
type: HandleType;
position: Position;