feat(controls): add showZoom, showFitView, showInteractive options #211

This commit is contained in:
moklick
2020-05-11 19:08:07 +02:00
parent 55b684e4ad
commit 6ea206e3be
2 changed files with 34 additions and 28 deletions
+4 -1
View File
@@ -254,7 +254,7 @@ const GraphWithMiniMap = () => (
### Controls
The control panel contains a zoom-in, zoom-out and a fit-view button. You can use it by passing it as a children to your React Flow component:
The control panel contains a zoom-in, zoom-out, fit-view and a lock/unlock button. You can use it by passing it as a children to the React Flow component:
```javascript
import ReactFlow, { Controls } from 'react-flow-renderer';
@@ -272,6 +272,9 @@ const GraphWithControls = () => (
- `style`: css properties
- `className`: class name
- `showZoom`: boolean - default: true
- `showFitView`: boolean - default: true
- `showInteractive`: boolean - default: true
## Examples