refactor(minimap): use minimap package in examples
This commit is contained in:
@@ -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,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);
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
GetMiniMapNodeAttribute,
|
||||
ReactFlowState,
|
||||
Rect,
|
||||
} from 'react-flow-renderer';
|
||||
} from '@react-flow/core';
|
||||
|
||||
import MiniMapNode from './MiniMapNode';
|
||||
import MiniMapDrag from './MiniMapDrag';
|
||||
|
||||
Reference in New Issue
Block a user