feat(props): add onZoomPaneClick

This commit is contained in:
Nate Amack
2020-07-31 10:45:40 -06:00
parent e3d24507e5
commit 2a0274b9a3
4 changed files with 26 additions and 2 deletions
+3
View File
@@ -47,6 +47,7 @@ export interface ReactFlowProps extends Omit<HTMLAttributes<HTMLDivElement>, 'on
onMoveStart?: (flowTransform?: FlowTransform) => void;
onMoveEnd?: (flowTransform?: FlowTransform) => void;
onSelectionChange?: (elements: Elements | null) => void;
onZoomPaneClick?: () => void;
nodeTypes: NodeTypesType;
edgeTypes: EdgeTypesType;
connectionLineType: ConnectionLineType;
@@ -112,6 +113,7 @@ const ReactFlow = ({
zoomOnScroll,
zoomOnDoubleClick,
paneMoveable,
onZoomPaneClick,
}: ReactFlowProps) => {
const nodeTypesParsed = useMemo(() => createNodeTypes(nodeTypes), []);
const edgeTypesParsed = useMemo(() => createEdgeTypes(edgeTypes), []);
@@ -157,6 +159,7 @@ const ReactFlow = ({
zoomOnScroll={zoomOnScroll}
zoomOnDoubleClick={zoomOnDoubleClick}
paneMoveable={paneMoveable}
onZoomPaneClick={onZoomPaneClick}
/>
{onSelectionChange && <SelectionListener onSelectionChange={onSelectionChange} />}
{children}