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
+4 -4
View File
@@ -6,14 +6,14 @@
"module": "dist/react-flow-minimap.esm.js",
"license": "MIT",
"dependencies": {
"@react-flow/core": "11.0.0"
},
"peerDependencies": {
"classcat": "^5.0.3",
"d3-drag": "^3.0.0",
"d3-selection": "^3.0.0",
"zustand": "^4.0.0-rc.1"
},
"peerDependencies": {
"react": "^18.1.0",
"react-flow-renderer": "^10.3.5"
"zustand": "^3.7.2"
},
"devDependencies": {
"@types/d3-drag": "^3.0.1",
+1 -1
View File
@@ -1,7 +1,7 @@
import React, { useEffect, useRef } from 'react';
import { drag, D3DragEvent, SubjectPosition } from 'd3-drag';
import { select } from 'd3-selection';
import { useReactFlow } from 'react-flow-renderer';
import { useReactFlow } from '@react-flow/core';
function MiniMapDrag({ x = 0, y = 0, width = 0, height = 0 }) {
const dragRef = useRef<SVGRectElement>(null);
+1 -1
View File
@@ -9,7 +9,7 @@ import {
GetMiniMapNodeAttribute,
ReactFlowState,
Rect,
} from 'react-flow-renderer';
} from '@react-flow/core';
import MiniMapNode from './MiniMapNode';
import MiniMapDrag from './MiniMapDrag';