refactor(minimap): use minimap package in examples

This commit is contained in:
Christopher Möller
2022-07-21 12:02:43 +02:00
parent be4dd6f1fa
commit 229c156d79
17 changed files with 37 additions and 41 deletions
+3
View File
@@ -9,6 +9,8 @@ import ReactFlow, {
useReactFlow,
} from '@react-flow/core';
import Minimap from '@react-flow/minimap';
const onNodeDrag = (_: MouseEvent, node: Node) => console.log('drag', node);
const onNodeDragStop = (_: MouseEvent, node: Node) =>
console.log('drag stop', node);
@@ -93,6 +95,7 @@ const BasicFlow = () => {
selectNodesOnDrag={false}
>
<Background variant={BackgroundVariant.Lines} />
<Minimap />
<div style={{ position: 'absolute', right: 10, top: 10, zIndex: 4 }}>
<button onClick={resetTransform} style={{ marginRight: 5 }}>