@octanejs/xyflow 0.1.18 → 0.1.19
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
|
@@ -8,32 +8,36 @@ type SymbolProps = Omit<EdgeMarker, 'type'>;
|
|
|
8
8
|
const ArrowSymbol = ({ color = 'none', strokeWidth = 1 }: SymbolProps) => {
|
|
9
9
|
const style = {
|
|
10
10
|
strokeWidth,
|
|
11
|
-
...color && { stroke: color },
|
|
11
|
+
...(color && { stroke: color }),
|
|
12
12
|
};
|
|
13
13
|
|
|
14
|
-
return
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
14
|
+
return (
|
|
15
|
+
<polyline
|
|
16
|
+
className="arrow"
|
|
17
|
+
style={style}
|
|
18
|
+
strokeLinecap="round"
|
|
19
|
+
fill="none"
|
|
20
|
+
strokeLinejoin="round"
|
|
21
|
+
points="-5,-4 0,0 -5,4"
|
|
22
|
+
/>
|
|
23
|
+
);
|
|
22
24
|
};
|
|
23
25
|
|
|
24
26
|
const ArrowClosedSymbol = ({ color = 'none', strokeWidth = 1 }: SymbolProps) => {
|
|
25
27
|
const style = {
|
|
26
28
|
strokeWidth,
|
|
27
|
-
...color && { stroke: color, fill: color },
|
|
29
|
+
...(color && { stroke: color, fill: color }),
|
|
28
30
|
};
|
|
29
31
|
|
|
30
|
-
return
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
32
|
+
return (
|
|
33
|
+
<polyline
|
|
34
|
+
className="arrowclosed"
|
|
35
|
+
style={style}
|
|
36
|
+
strokeLinecap="round"
|
|
37
|
+
strokeLinejoin="round"
|
|
38
|
+
points="-5,-4 0,0 -5,4 -5,-4"
|
|
39
|
+
/>
|
|
40
|
+
);
|
|
37
41
|
};
|
|
38
42
|
|
|
39
43
|
export const MarkerSymbols = {
|
|
@@ -8,28 +8,27 @@ import type { GraphViewProps } from '../GraphView/index.tsrx';
|
|
|
8
8
|
import EdgeWrapper from '../../components/EdgeWrapper/index.tsrx';
|
|
9
9
|
import type { Edge, ReactFlowState, Node } from '../../types';
|
|
10
10
|
|
|
11
|
-
type EdgeRendererProps<EdgeType extends Edge = Edge> =
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
};
|
|
11
|
+
type EdgeRendererProps<EdgeType extends Edge = Edge> = Pick<
|
|
12
|
+
GraphViewProps<Node, EdgeType>,
|
|
13
|
+
| 'onEdgeClick'
|
|
14
|
+
| 'onEdgeDoubleClick'
|
|
15
|
+
| 'defaultMarkerColor'
|
|
16
|
+
| 'onlyRenderVisibleElements'
|
|
17
|
+
| 'onReconnect'
|
|
18
|
+
| 'onEdgeContextMenu'
|
|
19
|
+
| 'onEdgeMouseEnter'
|
|
20
|
+
| 'onEdgeMouseMove'
|
|
21
|
+
| 'onEdgeMouseLeave'
|
|
22
|
+
| 'onReconnectStart'
|
|
23
|
+
| 'onReconnectEnd'
|
|
24
|
+
| 'reconnectRadius'
|
|
25
|
+
| 'noPanClassName'
|
|
26
|
+
| 'rfId'
|
|
27
|
+
| 'disableKeyboardA11y'
|
|
28
|
+
| 'edgeTypes'
|
|
29
|
+
> & {
|
|
30
|
+
children?: OctaneNode;
|
|
31
|
+
};
|
|
33
32
|
|
|
34
33
|
const selector = (s: ReactFlowState) => ({
|
|
35
34
|
edgesFocusable: s.edgesFocusable,
|
|
@@ -63,34 +62,38 @@ function EdgeRendererComponent<EdgeType extends Edge = Edge>({
|
|
|
63
62
|
);
|
|
64
63
|
const edgeIds = useVisibleEdgeIds(onlyRenderVisibleElements);
|
|
65
64
|
|
|
66
|
-
return
|
|
67
|
-
<
|
|
65
|
+
return (
|
|
66
|
+
<div className="react-flow__edges">
|
|
67
|
+
<MarkerDefinitions defaultColor={defaultMarkerColor} rfId={rfId} />
|
|
68
68
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
69
|
+
{edgeIds.map((id) => {
|
|
70
|
+
return (
|
|
71
|
+
<EdgeWrapper
|
|
72
|
+
key={id}
|
|
73
|
+
id={id}
|
|
74
|
+
edgesFocusable={edgesFocusable}
|
|
75
|
+
edgesReconnectable={edgesReconnectable}
|
|
76
|
+
elementsSelectable={elementsSelectable}
|
|
77
|
+
noPanClassName={noPanClassName}
|
|
78
|
+
onReconnect={onReconnect}
|
|
79
|
+
onContextMenu={onEdgeContextMenu}
|
|
80
|
+
onMouseEnter={onEdgeMouseEnter}
|
|
81
|
+
onMouseMove={onEdgeMouseMove}
|
|
82
|
+
onMouseLeave={onEdgeMouseLeave}
|
|
83
|
+
onClick={onEdgeClick}
|
|
84
|
+
reconnectRadius={reconnectRadius}
|
|
85
|
+
onDoubleClick={onEdgeDoubleClick}
|
|
86
|
+
onReconnectStart={onReconnectStart}
|
|
87
|
+
onReconnectEnd={onReconnectEnd}
|
|
88
|
+
rfId={rfId}
|
|
89
|
+
onError={onError}
|
|
90
|
+
edgeTypes={edgeTypes}
|
|
91
|
+
disableKeyboardA11y={disableKeyboardA11y}
|
|
92
|
+
/>
|
|
93
|
+
);
|
|
94
|
+
})}
|
|
95
|
+
</div>
|
|
96
|
+
);
|
|
94
97
|
}
|
|
95
98
|
|
|
96
99
|
EdgeRendererComponent.displayName = 'EdgeRenderer';
|
|
@@ -10,28 +10,26 @@ import { Pane } from '../Pane/index.tsrx';
|
|
|
10
10
|
import { NodesSelection } from '../../components/NodesSelection/index.tsrx';
|
|
11
11
|
import type { ReactFlowState, Node } from '../../types';
|
|
12
12
|
|
|
13
|
-
export type FlowRendererProps<NodeType extends Node = Node> =
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
};
|
|
13
|
+
export type FlowRendererProps<NodeType extends Node = Node> = Omit<
|
|
14
|
+
GraphViewProps<NodeType>,
|
|
15
|
+
| 'snapToGrid'
|
|
16
|
+
| 'nodeTypes'
|
|
17
|
+
| 'edgeTypes'
|
|
18
|
+
| 'snapGrid'
|
|
19
|
+
| 'connectionLineType'
|
|
20
|
+
| 'connectionLineContainerStyle'
|
|
21
|
+
| 'arrowHeadColor'
|
|
22
|
+
| 'onlyRenderVisibleElements'
|
|
23
|
+
| 'selectNodesOnDrag'
|
|
24
|
+
| 'defaultMarkerColor'
|
|
25
|
+
| 'rfId'
|
|
26
|
+
| 'nodeClickDistance'
|
|
27
|
+
> & {
|
|
28
|
+
isControlledViewport: boolean;
|
|
29
|
+
children: OctaneNode;
|
|
30
|
+
};
|
|
32
31
|
|
|
33
|
-
const win =
|
|
34
|
-
typeof window !== 'undefined' ? window : undefined;
|
|
32
|
+
const win = typeof window !== 'undefined' ? window : undefined;
|
|
35
33
|
|
|
36
34
|
const selector = (s: ReactFlowState) => {
|
|
37
35
|
return {
|
|
@@ -90,55 +88,58 @@ function FlowRendererComponent<NodeType extends Node = Node>({
|
|
|
90
88
|
|
|
91
89
|
useGlobalKeyHandler({ deleteKeyCode, multiSelectionKeyCode });
|
|
92
90
|
|
|
93
|
-
return
|
|
94
|
-
|
|
95
|
-
elementsSelectable={elementsSelectable}
|
|
96
|
-
zoomOnScroll={zoomOnScroll}
|
|
97
|
-
zoomOnPinch={zoomOnPinch}
|
|
98
|
-
panOnScroll={panOnScroll}
|
|
99
|
-
panOnScrollSpeed={panOnScrollSpeed}
|
|
100
|
-
panOnScrollMode={panOnScrollMode}
|
|
101
|
-
zoomOnDoubleClick={zoomOnDoubleClick}
|
|
102
|
-
panOnDrag={!selectionKeyPressed && panOnDrag}
|
|
103
|
-
defaultViewport={defaultViewport}
|
|
104
|
-
translateExtent={translateExtent}
|
|
105
|
-
minZoom={minZoom}
|
|
106
|
-
maxZoom={maxZoom}
|
|
107
|
-
zoomActivationKeyCode={zoomActivationKeyCode}
|
|
108
|
-
preventScrolling={preventScrolling}
|
|
109
|
-
noWheelClassName={noWheelClassName}
|
|
110
|
-
noPanClassName={noPanClassName}
|
|
111
|
-
onViewportChange={onViewportChange}
|
|
112
|
-
isControlledViewport={isControlledViewport}
|
|
113
|
-
paneClickDistance={paneClickDistance}
|
|
114
|
-
selectionOnDrag={_selectionOnDrag}
|
|
115
|
-
>
|
|
116
|
-
<Pane
|
|
117
|
-
onSelectionStart={onSelectionStart}
|
|
118
|
-
onSelectionEnd={onSelectionEnd}
|
|
119
|
-
onPaneClick={onPaneClick}
|
|
120
|
-
onPaneMouseEnter={onPaneMouseEnter}
|
|
121
|
-
onPaneMouseMove={onPaneMouseMove}
|
|
122
|
-
onPaneMouseLeave={onPaneMouseLeave}
|
|
91
|
+
return (
|
|
92
|
+
<ZoomPane
|
|
123
93
|
onPaneContextMenu={onPaneContextMenu}
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
94
|
+
elementsSelectable={elementsSelectable}
|
|
95
|
+
zoomOnScroll={zoomOnScroll}
|
|
96
|
+
zoomOnPinch={zoomOnPinch}
|
|
97
|
+
panOnScroll={panOnScroll}
|
|
98
|
+
panOnScrollSpeed={panOnScrollSpeed}
|
|
99
|
+
panOnScrollMode={panOnScrollMode}
|
|
100
|
+
zoomOnDoubleClick={zoomOnDoubleClick}
|
|
101
|
+
panOnDrag={!selectionKeyPressed && panOnDrag}
|
|
102
|
+
defaultViewport={defaultViewport}
|
|
103
|
+
translateExtent={translateExtent}
|
|
104
|
+
minZoom={minZoom}
|
|
105
|
+
maxZoom={maxZoom}
|
|
106
|
+
zoomActivationKeyCode={zoomActivationKeyCode}
|
|
107
|
+
preventScrolling={preventScrolling}
|
|
108
|
+
noWheelClassName={noWheelClassName}
|
|
109
|
+
noPanClassName={noPanClassName}
|
|
110
|
+
onViewportChange={onViewportChange}
|
|
111
|
+
isControlledViewport={isControlledViewport}
|
|
130
112
|
paneClickDistance={paneClickDistance}
|
|
131
113
|
selectionOnDrag={_selectionOnDrag}
|
|
132
114
|
>
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
115
|
+
<Pane
|
|
116
|
+
onSelectionStart={onSelectionStart}
|
|
117
|
+
onSelectionEnd={onSelectionEnd}
|
|
118
|
+
onPaneClick={onPaneClick}
|
|
119
|
+
onPaneMouseEnter={onPaneMouseEnter}
|
|
120
|
+
onPaneMouseMove={onPaneMouseMove}
|
|
121
|
+
onPaneMouseLeave={onPaneMouseLeave}
|
|
122
|
+
onPaneContextMenu={onPaneContextMenu}
|
|
123
|
+
onPaneScroll={onPaneScroll}
|
|
124
|
+
panOnDrag={panOnDrag}
|
|
125
|
+
autoPanOnSelection={autoPanOnSelection}
|
|
126
|
+
isSelecting={!!isSelecting}
|
|
127
|
+
selectionMode={selectionMode}
|
|
128
|
+
selectionKeyPressed={selectionKeyPressed}
|
|
129
|
+
paneClickDistance={paneClickDistance}
|
|
130
|
+
selectionOnDrag={_selectionOnDrag}
|
|
131
|
+
>
|
|
132
|
+
{children}
|
|
133
|
+
{nodesSelectionActive && (
|
|
134
|
+
<NodesSelection
|
|
135
|
+
onSelectionContextMenu={onSelectionContextMenu}
|
|
136
|
+
noPanClassName={noPanClassName}
|
|
137
|
+
disableKeyboardA11y={disableKeyboardA11y}
|
|
138
|
+
/>
|
|
139
|
+
)}
|
|
140
|
+
</Pane>
|
|
141
|
+
</ZoomPane>
|
|
142
|
+
);
|
|
142
143
|
}
|
|
143
144
|
|
|
144
145
|
FlowRendererComponent.displayName = 'FlowRenderer';
|
|
@@ -11,17 +11,17 @@ import { useNodeOrEdgeTypesWarning } from './useNodeOrEdgeTypesWarning';
|
|
|
11
11
|
import type { Edge, Node, ReactFlowProps } from '../../types';
|
|
12
12
|
import { useStylesLoadedWarning } from './useStylesLoadedWarning';
|
|
13
13
|
|
|
14
|
-
export type GraphViewProps<NodeType extends Node = Node, EdgeType extends Edge = Edge> =
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
14
|
+
export type GraphViewProps<NodeType extends Node = Node, EdgeType extends Edge = Edge> = Omit<
|
|
15
|
+
ReactFlowProps<NodeType, EdgeType>,
|
|
16
|
+
| 'onSelectionChange'
|
|
17
|
+
| 'nodes'
|
|
18
|
+
| 'edges'
|
|
19
|
+
| 'onMove'
|
|
20
|
+
| 'onMoveStart'
|
|
21
|
+
| 'onMoveEnd'
|
|
22
|
+
| 'elevateEdgesOnSelect'
|
|
23
|
+
> &
|
|
24
|
+
Required<
|
|
25
25
|
Pick<
|
|
26
26
|
ReactFlowProps<NodeType, EdgeType>,
|
|
27
27
|
| 'selectionKeyCode'
|
|
@@ -120,91 +120,93 @@ function GraphViewComponent<NodeType extends Node = Node, EdgeType extends Edge
|
|
|
120
120
|
useOnInitHandler(onInit);
|
|
121
121
|
useViewportSync(viewport);
|
|
122
122
|
|
|
123
|
-
return
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
<
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
123
|
+
return (
|
|
124
|
+
<FlowRenderer
|
|
125
|
+
onPaneClick={onPaneClick}
|
|
126
|
+
onPaneMouseEnter={onPaneMouseEnter}
|
|
127
|
+
onPaneMouseMove={onPaneMouseMove}
|
|
128
|
+
onPaneMouseLeave={onPaneMouseLeave}
|
|
129
|
+
onPaneContextMenu={onPaneContextMenu}
|
|
130
|
+
onPaneScroll={onPaneScroll}
|
|
131
|
+
paneClickDistance={paneClickDistance}
|
|
132
|
+
deleteKeyCode={deleteKeyCode}
|
|
133
|
+
selectionKeyCode={selectionKeyCode}
|
|
134
|
+
selectionOnDrag={selectionOnDrag}
|
|
135
|
+
selectionMode={selectionMode}
|
|
136
|
+
onSelectionStart={onSelectionStart}
|
|
137
|
+
onSelectionEnd={onSelectionEnd}
|
|
138
|
+
multiSelectionKeyCode={multiSelectionKeyCode}
|
|
139
|
+
panActivationKeyCode={panActivationKeyCode}
|
|
140
|
+
zoomActivationKeyCode={zoomActivationKeyCode}
|
|
141
|
+
elementsSelectable={elementsSelectable}
|
|
142
|
+
zoomOnScroll={zoomOnScroll}
|
|
143
|
+
zoomOnPinch={zoomOnPinch}
|
|
144
|
+
zoomOnDoubleClick={zoomOnDoubleClick}
|
|
145
|
+
panOnScroll={panOnScroll}
|
|
146
|
+
panOnScrollSpeed={panOnScrollSpeed}
|
|
147
|
+
panOnScrollMode={panOnScrollMode}
|
|
148
|
+
panOnDrag={panOnDrag}
|
|
149
|
+
autoPanOnSelection={autoPanOnSelection}
|
|
150
|
+
defaultViewport={defaultViewport}
|
|
151
|
+
translateExtent={translateExtent}
|
|
152
|
+
minZoom={minZoom}
|
|
153
|
+
maxZoom={maxZoom}
|
|
154
|
+
onSelectionContextMenu={onSelectionContextMenu}
|
|
155
|
+
preventScrolling={preventScrolling}
|
|
156
|
+
noDragClassName={noDragClassName}
|
|
157
|
+
noWheelClassName={noWheelClassName}
|
|
158
|
+
noPanClassName={noPanClassName}
|
|
159
|
+
disableKeyboardA11y={disableKeyboardA11y}
|
|
160
|
+
onViewportChange={onViewportChange}
|
|
161
|
+
isControlledViewport={!!viewport}
|
|
162
|
+
>
|
|
163
|
+
<Viewport>
|
|
164
|
+
<EdgeRenderer
|
|
165
|
+
edgeTypes={edgeTypes}
|
|
166
|
+
onEdgeClick={onEdgeClick}
|
|
167
|
+
onEdgeDoubleClick={onEdgeDoubleClick}
|
|
168
|
+
onReconnect={onReconnect}
|
|
169
|
+
onReconnectStart={onReconnectStart}
|
|
170
|
+
onReconnectEnd={onReconnectEnd}
|
|
171
|
+
onlyRenderVisibleElements={onlyRenderVisibleElements}
|
|
172
|
+
onEdgeContextMenu={onEdgeContextMenu}
|
|
173
|
+
onEdgeMouseEnter={onEdgeMouseEnter}
|
|
174
|
+
onEdgeMouseMove={onEdgeMouseMove}
|
|
175
|
+
onEdgeMouseLeave={onEdgeMouseLeave}
|
|
176
|
+
reconnectRadius={reconnectRadius}
|
|
177
|
+
defaultMarkerColor={defaultMarkerColor}
|
|
178
|
+
noPanClassName={noPanClassName}
|
|
179
|
+
disableKeyboardA11y={disableKeyboardA11y}
|
|
180
|
+
rfId={rfId}
|
|
181
|
+
/>
|
|
182
|
+
<ConnectionLineWrapper
|
|
183
|
+
style={connectionLineStyle}
|
|
184
|
+
type={connectionLineType}
|
|
185
|
+
component={connectionLineComponent}
|
|
186
|
+
containerStyle={connectionLineContainerStyle}
|
|
187
|
+
/>
|
|
188
|
+
<div className="react-flow__edgelabel-renderer" />
|
|
189
|
+
<NodeRenderer
|
|
190
|
+
nodeTypes={nodeTypes}
|
|
191
|
+
onNodeClick={onNodeClick}
|
|
192
|
+
onNodeDoubleClick={onNodeDoubleClick}
|
|
193
|
+
onNodeMouseEnter={onNodeMouseEnter}
|
|
194
|
+
onNodeMouseMove={onNodeMouseMove}
|
|
195
|
+
onNodeMouseLeave={onNodeMouseLeave}
|
|
196
|
+
onNodeContextMenu={onNodeContextMenu}
|
|
197
|
+
nodeClickDistance={nodeClickDistance}
|
|
198
|
+
onlyRenderVisibleElements={onlyRenderVisibleElements}
|
|
199
|
+
noPanClassName={noPanClassName}
|
|
200
|
+
noDragClassName={noDragClassName}
|
|
201
|
+
disableKeyboardA11y={disableKeyboardA11y}
|
|
202
|
+
nodeExtent={nodeExtent}
|
|
203
|
+
rfId={rfId}
|
|
204
|
+
nodesDraggable={nodesDraggable}
|
|
205
|
+
/>
|
|
206
|
+
<div className="react-flow__viewport-portal" />
|
|
207
|
+
</Viewport>
|
|
208
|
+
</FlowRenderer>
|
|
209
|
+
);
|
|
208
210
|
}
|
|
209
211
|
|
|
210
212
|
GraphViewComponent.displayName = 'GraphView';
|