@octanejs/xyflow 0.1.18 → 0.1.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +6 -6
- package/src/additional-components/Background/Background.tsrx +32 -26
- package/src/additional-components/Background/Patterns.tsrx +15 -11
- package/src/additional-components/Controls/ControlButton.tsrx +5 -5
- package/src/additional-components/Controls/Controls.tsrx +48 -44
- package/src/additional-components/Controls/Icons/FitView.tsrx +5 -5
- package/src/additional-components/Controls/Icons/Lock.tsrx +5 -5
- package/src/additional-components/Controls/Icons/Minus.tsrx +5 -3
- package/src/additional-components/Controls/Icons/Plus.tsrx +5 -3
- package/src/additional-components/Controls/Icons/Unlock.tsrx +5 -5
- package/src/additional-components/EdgeToolbar/EdgeToolbar.tsrx +20 -17
- package/src/additional-components/MiniMap/MiniMap.tsrx +85 -86
- package/src/additional-components/MiniMap/MiniMapNode.tsrx +18 -16
- package/src/additional-components/MiniMap/MiniMapNodes.tsrx +47 -45
- package/src/additional-components/NodeResizer/NodeResizeControl.tsrx +31 -30
- package/src/additional-components/NodeResizer/NodeResizer.tsrx +10 -10
- package/src/additional-components/NodeToolbar/NodeToolbar.tsrx +32 -25
- package/src/components/A11yDescriptions/index.tsrx +23 -18
- package/src/components/Attribution/index.tsrx +11 -9
- package/src/components/BatchProvider/index.tsrx +8 -11
- package/src/components/ConnectionLine/index.tsrx +31 -27
- package/src/components/EdgeWrapper/EdgeUpdateAnchors.tsrx +38 -35
- package/src/components/EdgeWrapper/index.tsrx +155 -146
- package/src/components/Edges/BaseEdge.tsrx +16 -14
- package/src/components/Edges/BezierEdge.tsrx +47 -43
- package/src/components/Edges/EdgeAnchor.tsrx +13 -11
- package/src/components/Edges/EdgeText.tsrx +31 -26
- package/src/components/Edges/SimpleBezierEdge.tsrx +55 -44
- package/src/components/Edges/SmoothStepEdge.tsrx +49 -45
- package/src/components/Edges/StepEdge.tsrx +10 -7
- package/src/components/Edges/StraightEdge.tsrx +40 -36
- package/src/components/Handle/index.tsrx +73 -63
- package/src/components/NodeWrapper/index.tsrx +86 -72
- package/src/components/Nodes/DefaultNode.tsrx +7 -5
- package/src/components/Nodes/InputNode.tsrx +11 -7
- package/src/components/Nodes/OutputNode.tsrx +11 -7
- package/src/components/NodesSelection/index.tsrx +23 -22
- package/src/components/Panel/index.tsrx +17 -14
- package/src/components/ReactFlowProvider/index.tsrx +25 -23
- package/src/components/SelectionListener/index.tsrx +4 -2
- package/src/components/StoreUpdater/index.tsrx +43 -34
- package/src/components/UserSelection/index.tsrx +10 -8
- package/src/container/EdgeRenderer/MarkerDefinitions.tsrx +34 -29
- package/src/container/EdgeRenderer/MarkerSymbols.tsrx +21 -17
- package/src/container/EdgeRenderer/index.tsrx +52 -49
- package/src/container/FlowRenderer/index.tsrx +67 -66
- package/src/container/GraphView/index.tsrx +98 -96
- package/src/container/NodeRenderer/index.tsrx +74 -71
- package/src/container/Pane/index.tsrx +69 -60
- package/src/container/ReactFlow/Wrapper.tsrx +23 -21
- package/src/container/ReactFlow/index.tsrx +158 -153
- package/src/container/Viewport/index.tsrx +13 -7
- package/src/container/ZoomPane/index.tsrx +28 -25
|
@@ -51,7 +51,13 @@ export function getSimpleBezierPath({
|
|
|
51
51
|
targetX,
|
|
52
52
|
targetY,
|
|
53
53
|
targetPosition = Position.Top,
|
|
54
|
-
}: GetSimpleBezierPathParams): [
|
|
54
|
+
}: GetSimpleBezierPathParams): [
|
|
55
|
+
path: string,
|
|
56
|
+
labelX: number,
|
|
57
|
+
labelY: number,
|
|
58
|
+
offsetX: number,
|
|
59
|
+
offsetY: number,
|
|
60
|
+
] {
|
|
55
61
|
const [sourceControlX, sourceControlY] = getControl({
|
|
56
62
|
pos: sourcePosition,
|
|
57
63
|
x1: sourceX,
|
|
@@ -88,53 +94,57 @@ export function getSimpleBezierPath({
|
|
|
88
94
|
|
|
89
95
|
function createSimpleBezierEdge(params: { isInternal: boolean }) {
|
|
90
96
|
// eslint-disable-next-line react/display-name
|
|
91
|
-
return memo(
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
sourceY,
|
|
95
|
-
targetX,
|
|
96
|
-
targetY,
|
|
97
|
-
sourcePosition,
|
|
98
|
-
targetPosition,
|
|
99
|
-
label,
|
|
100
|
-
labelStyle,
|
|
101
|
-
labelShowBg,
|
|
102
|
-
labelBgStyle,
|
|
103
|
-
labelBgPadding,
|
|
104
|
-
labelBgBorderRadius,
|
|
105
|
-
style,
|
|
106
|
-
markerEnd,
|
|
107
|
-
markerStart,
|
|
108
|
-
interactionWidth,
|
|
109
|
-
}: SimpleBezierEdgeProps) => {
|
|
110
|
-
const [path, labelX, labelY] = getSimpleBezierPath({
|
|
97
|
+
return memo(
|
|
98
|
+
({
|
|
99
|
+
id,
|
|
111
100
|
sourceX,
|
|
112
101
|
sourceY,
|
|
113
|
-
sourcePosition,
|
|
114
102
|
targetX,
|
|
115
103
|
targetY,
|
|
104
|
+
sourcePosition,
|
|
116
105
|
targetPosition,
|
|
117
|
-
|
|
106
|
+
label,
|
|
107
|
+
labelStyle,
|
|
108
|
+
labelShowBg,
|
|
109
|
+
labelBgStyle,
|
|
110
|
+
labelBgPadding,
|
|
111
|
+
labelBgBorderRadius,
|
|
112
|
+
style,
|
|
113
|
+
markerEnd,
|
|
114
|
+
markerStart,
|
|
115
|
+
interactionWidth,
|
|
116
|
+
}: SimpleBezierEdgeProps) => {
|
|
117
|
+
const [path, labelX, labelY] = getSimpleBezierPath({
|
|
118
|
+
sourceX,
|
|
119
|
+
sourceY,
|
|
120
|
+
sourcePosition,
|
|
121
|
+
targetX,
|
|
122
|
+
targetY,
|
|
123
|
+
targetPosition,
|
|
124
|
+
});
|
|
118
125
|
|
|
119
|
-
|
|
126
|
+
const _id = params.isInternal ? undefined : id;
|
|
120
127
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
128
|
+
return (
|
|
129
|
+
<BaseEdge
|
|
130
|
+
id={_id}
|
|
131
|
+
path={path}
|
|
132
|
+
labelX={labelX}
|
|
133
|
+
labelY={labelY}
|
|
134
|
+
label={label}
|
|
135
|
+
labelStyle={labelStyle}
|
|
136
|
+
labelShowBg={labelShowBg}
|
|
137
|
+
labelBgStyle={labelBgStyle}
|
|
138
|
+
labelBgPadding={labelBgPadding}
|
|
139
|
+
labelBgBorderRadius={labelBgBorderRadius}
|
|
140
|
+
style={style}
|
|
141
|
+
markerEnd={markerEnd}
|
|
142
|
+
markerStart={markerStart}
|
|
143
|
+
interactionWidth={interactionWidth}
|
|
144
|
+
/>
|
|
145
|
+
);
|
|
146
|
+
},
|
|
147
|
+
);
|
|
138
148
|
}
|
|
139
149
|
|
|
140
150
|
const SimpleBezierEdge = createSimpleBezierEdge({ isInternal: false });
|
|
@@ -142,9 +152,10 @@ const SimpleBezierEdgeInternal = createSimpleBezierEdge({ isInternal: true });
|
|
|
142
152
|
|
|
143
153
|
(SimpleBezierEdge as typeof SimpleBezierEdge & { displayName?: string }).displayName =
|
|
144
154
|
'SimpleBezierEdge';
|
|
145
|
-
(
|
|
146
|
-
typeof SimpleBezierEdgeInternal & {
|
|
155
|
+
(
|
|
156
|
+
SimpleBezierEdgeInternal as typeof SimpleBezierEdgeInternal & {
|
|
147
157
|
displayName?: string;
|
|
148
|
-
}
|
|
158
|
+
}
|
|
159
|
+
).displayName = 'SimpleBezierEdgeInternal';
|
|
149
160
|
|
|
150
161
|
export { SimpleBezierEdge, SimpleBezierEdgeInternal };
|
|
@@ -6,57 +6,61 @@ import type { SmoothStepEdgeProps } from '../../types';
|
|
|
6
6
|
|
|
7
7
|
function createSmoothStepEdge(params: { isInternal: boolean }) {
|
|
8
8
|
// eslint-disable-next-line react/display-name
|
|
9
|
-
return memo(
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
sourceY,
|
|
13
|
-
targetX,
|
|
14
|
-
targetY,
|
|
15
|
-
label,
|
|
16
|
-
labelStyle,
|
|
17
|
-
labelShowBg,
|
|
18
|
-
labelBgStyle,
|
|
19
|
-
labelBgPadding,
|
|
20
|
-
labelBgBorderRadius,
|
|
21
|
-
style,
|
|
22
|
-
sourcePosition = Position.Bottom,
|
|
23
|
-
targetPosition = Position.Top,
|
|
24
|
-
markerEnd,
|
|
25
|
-
markerStart,
|
|
26
|
-
pathOptions,
|
|
27
|
-
interactionWidth,
|
|
28
|
-
}: SmoothStepEdgeProps) => {
|
|
29
|
-
const [path, labelX, labelY] = getSmoothStepPath({
|
|
9
|
+
return memo(
|
|
10
|
+
({
|
|
11
|
+
id,
|
|
30
12
|
sourceX,
|
|
31
13
|
sourceY,
|
|
32
|
-
sourcePosition,
|
|
33
14
|
targetX,
|
|
34
15
|
targetY,
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
16
|
+
label,
|
|
17
|
+
labelStyle,
|
|
18
|
+
labelShowBg,
|
|
19
|
+
labelBgStyle,
|
|
20
|
+
labelBgPadding,
|
|
21
|
+
labelBgBorderRadius,
|
|
22
|
+
style,
|
|
23
|
+
sourcePosition = Position.Bottom,
|
|
24
|
+
targetPosition = Position.Top,
|
|
25
|
+
markerEnd,
|
|
26
|
+
markerStart,
|
|
27
|
+
pathOptions,
|
|
28
|
+
interactionWidth,
|
|
29
|
+
}: SmoothStepEdgeProps) => {
|
|
30
|
+
const [path, labelX, labelY] = getSmoothStepPath({
|
|
31
|
+
sourceX,
|
|
32
|
+
sourceY,
|
|
33
|
+
sourcePosition,
|
|
34
|
+
targetX,
|
|
35
|
+
targetY,
|
|
36
|
+
targetPosition,
|
|
37
|
+
borderRadius: pathOptions?.borderRadius,
|
|
38
|
+
offset: pathOptions?.offset,
|
|
39
|
+
stepPosition: pathOptions?.stepPosition,
|
|
40
|
+
});
|
|
40
41
|
|
|
41
|
-
|
|
42
|
+
const _id = params.isInternal ? undefined : id;
|
|
42
43
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
44
|
+
return (
|
|
45
|
+
<BaseEdge
|
|
46
|
+
id={_id}
|
|
47
|
+
path={path}
|
|
48
|
+
labelX={labelX}
|
|
49
|
+
labelY={labelY}
|
|
50
|
+
label={label}
|
|
51
|
+
labelStyle={labelStyle}
|
|
52
|
+
labelShowBg={labelShowBg}
|
|
53
|
+
labelBgStyle={labelBgStyle}
|
|
54
|
+
labelBgPadding={labelBgPadding}
|
|
55
|
+
labelBgBorderRadius={labelBgBorderRadius}
|
|
56
|
+
style={style}
|
|
57
|
+
markerEnd={markerEnd}
|
|
58
|
+
markerStart={markerStart}
|
|
59
|
+
interactionWidth={interactionWidth}
|
|
60
|
+
/>
|
|
61
|
+
);
|
|
62
|
+
},
|
|
63
|
+
);
|
|
60
64
|
}
|
|
61
65
|
|
|
62
66
|
/**
|
|
@@ -8,13 +8,16 @@ function createStepEdge(params: { isInternal: boolean }) {
|
|
|
8
8
|
return memo(({ id, ...props }: StepEdgeProps) => {
|
|
9
9
|
const _id = params.isInternal ? undefined : id;
|
|
10
10
|
|
|
11
|
-
return
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
11
|
+
return (
|
|
12
|
+
<SmoothStepEdge
|
|
13
|
+
{...props}
|
|
14
|
+
id={_id}
|
|
15
|
+
pathOptions={useMemo(
|
|
16
|
+
() => ({ borderRadius: 0, offset: props.pathOptions?.offset }),
|
|
17
|
+
[props.pathOptions?.offset],
|
|
18
|
+
)}
|
|
19
|
+
/>
|
|
20
|
+
);
|
|
18
21
|
});
|
|
19
22
|
}
|
|
20
23
|
|
|
@@ -6,44 +6,48 @@ import type { StraightEdgeProps } from '../../types';
|
|
|
6
6
|
|
|
7
7
|
function createStraightEdge(params: { isInternal: boolean }) {
|
|
8
8
|
// eslint-disable-next-line react/display-name
|
|
9
|
-
return memo(
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
9
|
+
return memo(
|
|
10
|
+
({
|
|
11
|
+
id,
|
|
12
|
+
sourceX,
|
|
13
|
+
sourceY,
|
|
14
|
+
targetX,
|
|
15
|
+
targetY,
|
|
16
|
+
label,
|
|
17
|
+
labelStyle,
|
|
18
|
+
labelShowBg,
|
|
19
|
+
labelBgStyle,
|
|
20
|
+
labelBgPadding,
|
|
21
|
+
labelBgBorderRadius,
|
|
22
|
+
style,
|
|
23
|
+
markerEnd,
|
|
24
|
+
markerStart,
|
|
25
|
+
interactionWidth,
|
|
26
|
+
}: StraightEdgeProps) => {
|
|
27
|
+
const [path, labelX, labelY] = getStraightPath({ sourceX, sourceY, targetX, targetY });
|
|
27
28
|
|
|
28
|
-
|
|
29
|
+
const _id = params.isInternal ? undefined : id;
|
|
29
30
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
31
|
+
return (
|
|
32
|
+
<BaseEdge
|
|
33
|
+
id={_id}
|
|
34
|
+
path={path}
|
|
35
|
+
labelX={labelX}
|
|
36
|
+
labelY={labelY}
|
|
37
|
+
label={label}
|
|
38
|
+
labelStyle={labelStyle}
|
|
39
|
+
labelShowBg={labelShowBg}
|
|
40
|
+
labelBgStyle={labelBgStyle}
|
|
41
|
+
labelBgPadding={labelBgPadding}
|
|
42
|
+
labelBgBorderRadius={labelBgBorderRadius}
|
|
43
|
+
style={style}
|
|
44
|
+
markerEnd={markerEnd}
|
|
45
|
+
markerStart={markerStart}
|
|
46
|
+
interactionWidth={interactionWidth}
|
|
47
|
+
/>
|
|
48
|
+
);
|
|
49
|
+
},
|
|
50
|
+
);
|
|
47
51
|
}
|
|
48
52
|
|
|
49
53
|
/**
|
|
@@ -33,8 +33,8 @@ import { addEdge } from '../../utils/edges';
|
|
|
33
33
|
/**
|
|
34
34
|
* @expand
|
|
35
35
|
*/
|
|
36
|
-
export type HandleProps =
|
|
37
|
-
|
|
36
|
+
export type HandleProps = HandlePropsSystem &
|
|
37
|
+
Omit<HTMLAttributes<HTMLDivElement>, 'id'> & {
|
|
38
38
|
/** Callback called when connection is made */
|
|
39
39
|
onConnect?: OnConnect;
|
|
40
40
|
};
|
|
@@ -54,33 +54,35 @@ const idleConnectingState = {
|
|
|
54
54
|
valid: false,
|
|
55
55
|
};
|
|
56
56
|
|
|
57
|
-
const connectingSelector =
|
|
58
|
-
state: ReactFlowState
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
const { fromHandle, toHandle, isValid } = connection;
|
|
57
|
+
const connectingSelector =
|
|
58
|
+
(nodeId: string | null, handleId: string | null, type: HandleType) => (state: ReactFlowState) => {
|
|
59
|
+
const { connectionClickStartHandle: clickHandle, connectionMode, connection } = state;
|
|
60
|
+
const { fromHandle, toHandle, isValid } = connection;
|
|
62
61
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
62
|
+
if (!fromHandle && !clickHandle) {
|
|
63
|
+
return idleConnectingState;
|
|
64
|
+
}
|
|
66
65
|
|
|
67
|
-
|
|
68
|
-
|
|
66
|
+
const connectingTo =
|
|
67
|
+
toHandle?.nodeId === nodeId && toHandle?.id === handleId && toHandle?.type === type;
|
|
69
68
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
:
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
69
|
+
return {
|
|
70
|
+
connectingFrom:
|
|
71
|
+
fromHandle?.nodeId === nodeId && fromHandle?.id === handleId && fromHandle?.type === type,
|
|
72
|
+
connectingTo,
|
|
73
|
+
clickConnecting:
|
|
74
|
+
clickHandle?.nodeId === nodeId &&
|
|
75
|
+
clickHandle?.id === handleId &&
|
|
76
|
+
clickHandle?.type === type,
|
|
77
|
+
isPossibleEndHandle:
|
|
78
|
+
connectionMode === ConnectionMode.Strict
|
|
79
|
+
? fromHandle?.type !== type
|
|
80
|
+
: nodeId !== fromHandle?.nodeId || handleId !== fromHandle?.id,
|
|
81
|
+
connectionInProcess: !!fromHandle,
|
|
82
|
+
clickConnectionInProcess: !!clickHandle,
|
|
83
|
+
valid: connectingTo && isValid,
|
|
84
|
+
};
|
|
82
85
|
};
|
|
83
|
-
};
|
|
84
86
|
|
|
85
87
|
function HandleComponent(
|
|
86
88
|
{
|
|
@@ -144,8 +146,8 @@ function HandleComponent(
|
|
|
144
146
|
|
|
145
147
|
if (
|
|
146
148
|
isConnectableStart &&
|
|
147
|
-
|
|
148
|
-
|
|
149
|
+
((isMouseTriggered && (event as ReactMouseEvent<HTMLDivElement>).button === 0) ||
|
|
150
|
+
!isMouseTriggered)
|
|
149
151
|
) {
|
|
150
152
|
const currentStore = store.getState();
|
|
151
153
|
const fallbackIsValidConnection: NonNullable<HandleProps['isValidConnection']> = (...args) =>
|
|
@@ -197,7 +199,7 @@ function HandleComponent(
|
|
|
197
199
|
connection: connectionState,
|
|
198
200
|
} = store.getState();
|
|
199
201
|
|
|
200
|
-
if (!nodeId || !connectionClickStartHandle && !isConnectableStart) {
|
|
202
|
+
if (!nodeId || (!connectionClickStartHandle && !isConnectableStart)) {
|
|
201
203
|
return;
|
|
202
204
|
}
|
|
203
205
|
|
|
@@ -243,41 +245,49 @@ function HandleComponent(
|
|
|
243
245
|
store.setState({ connectionClickStartHandle: null });
|
|
244
246
|
};
|
|
245
247
|
|
|
246
|
-
return
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
248
|
+
return (
|
|
249
|
+
<div
|
|
250
|
+
data-handleid={handleId}
|
|
251
|
+
data-nodeid={nodeId}
|
|
252
|
+
data-handlepos={position}
|
|
253
|
+
data-id={`${rfId}-${nodeId}-${handleId}-${type}`}
|
|
254
|
+
className={cc([
|
|
255
|
+
'react-flow__handle',
|
|
256
|
+
`react-flow__handle-${position}`,
|
|
257
|
+
'nodrag',
|
|
258
|
+
noPanClassName,
|
|
259
|
+
className,
|
|
260
|
+
{
|
|
261
|
+
source: !isTarget,
|
|
262
|
+
target: isTarget,
|
|
263
|
+
connectable: isConnectable,
|
|
264
|
+
connectablestart: isConnectableStart,
|
|
265
|
+
connectableend: isConnectableEnd,
|
|
266
|
+
clickconnecting: clickConnecting,
|
|
267
|
+
connectingfrom: connectingFrom,
|
|
268
|
+
connectingto: connectingTo,
|
|
269
|
+
valid,
|
|
270
|
+
/*
|
|
271
|
+
* shows where you can start a connection from
|
|
272
|
+
* and where you can end it while connecting
|
|
273
|
+
*/
|
|
274
|
+
connectionindicator:
|
|
275
|
+
isConnectable &&
|
|
276
|
+
(!connectionInProcess || isPossibleEndHandle) &&
|
|
277
|
+
(connectionInProcess || clickConnectionInProcess
|
|
278
|
+
? isConnectableEnd
|
|
279
|
+
: isConnectableStart),
|
|
280
|
+
},
|
|
281
|
+
])}
|
|
282
|
+
onMouseDown={onPointerDown}
|
|
283
|
+
onTouchStart={onPointerDown}
|
|
284
|
+
onClick={connectOnClick ? onClick : undefined}
|
|
285
|
+
ref={ref}
|
|
286
|
+
{...rest}
|
|
287
|
+
>
|
|
288
|
+
{children}
|
|
289
|
+
</div>
|
|
290
|
+
);
|
|
281
291
|
}
|
|
282
292
|
|
|
283
293
|
/**
|