Merge branch 'drag-edge' of https://github.com/zcmgyu/react-flow into zcmgyu-drag-edge

This commit is contained in:
moklick
2020-11-05 16:04:37 +01:00
13 changed files with 6585 additions and 17 deletions
+4
View File
@@ -32,6 +32,7 @@ import {
OnConnectStopFunc,
OnConnectEndFunc,
TranslateExtent,
OnEdgeUpdateFunc,
} from '../../types';
import '../../style.css';
@@ -102,6 +103,7 @@ export interface ReactFlowProps extends Omit<HTMLAttributes<HTMLDivElement>, 'on
panOnScroll?: boolean;
panOnScrollSpeed?: number;
zoomOnDoubleClick?: boolean;
onEdgeUpdate?: OnEdgeUpdateFunc;
}
const ReactFlow = ({
@@ -159,6 +161,7 @@ const ReactFlow = ({
onPaneScroll,
onPaneContextMenu,
children,
onEdgeUpdate,
...rest
}: ReactFlowProps) => {
const nodeTypesParsed = useMemo(() => createNodeTypes(nodeTypes), []);
@@ -220,6 +223,7 @@ const ReactFlow = ({
onSelectionDrag={onSelectionDrag}
onSelectionDragStop={onSelectionDragStop}
onSelectionContextMenu={onSelectionContextMenu}
onEdgeUpdate={onEdgeUpdate}
/>
{onSelectionChange && <SelectionListener onSelectionChange={onSelectionChange} />}
{children}