diff --git a/examples/vite-app/src/examples/InteractiveMinimap/index.tsx b/examples/vite-app/src/examples/InteractiveMinimap/index.tsx index 3b63ffae..b09e89a1 100644 --- a/examples/vite-app/src/examples/InteractiveMinimap/index.tsx +++ b/examples/vite-app/src/examples/InteractiveMinimap/index.tsx @@ -104,6 +104,7 @@ const BasicFlow = () => { const logToObject = () => console.log(instance.toObject()); const resetTransform = () => instance.setViewport({ x: 0, y: 0, zoom: 1 }); + const toggleInverse = () => setInverse(!inverse); const toggleClassnames = () => { instance.setNodes((nodes) => @@ -155,7 +156,7 @@ const BasicFlow = () => { - diff --git a/packages/minimap/src/MiniMap.tsx b/packages/minimap/src/MiniMap.tsx index 5e67e133..103ac7a2 100644 --- a/packages/minimap/src/MiniMap.tsx +++ b/packages/minimap/src/MiniMap.tsx @@ -150,7 +150,7 @@ function MiniMap({ selection.on('zoom', null); }; } - }, [pannable, zoomable]); + }, [pannable, zoomable, inversePan, zoomStep]); const onSvgClick = onClick ? (event: MouseEvent) => {