clean up
This commit is contained in:
1 parent
58f18232b7
commit
50f1d2a42d
1 file changed
+2
-10
@@ -1,12 +1,8 @@
|
|||||||
import "./index.css";
|
import "./index.css";
|
||||||
|
|
||||||
import { FC, useRef } from "react";
|
import { FC } from "react";
|
||||||
import CircularProgress from "@mui/material/CircularProgress";
|
import CircularProgress from "@mui/material/CircularProgress";
|
||||||
import ReactFlow, {
|
import ReactFlow, { Controls, ReactFlowProvider } from "react-flow-renderer";
|
||||||
Controls,
|
|
||||||
ReactFlowProvider,
|
|
||||||
useViewport,
|
|
||||||
} from "react-flow-renderer";
|
|
||||||
|
|
||||||
import { NodeEditor } from "components/NodeEditor";
|
import { NodeEditor } from "components/NodeEditor";
|
||||||
import { Modal } from "components/Modal";
|
import { Modal } from "components/Modal";
|
||||||
@@ -27,8 +23,6 @@ export const DAGGraphBoardInner: FC<DAGGraphBoardProps> = ({
|
|||||||
state,
|
state,
|
||||||
closeModal,
|
closeModal,
|
||||||
}) => {
|
}) => {
|
||||||
const { zoom } = useViewport();
|
|
||||||
const lastZoom = useRef(zoom);
|
|
||||||
// render unready or errored states
|
// render unready or errored states
|
||||||
if (!state.ready) {
|
if (!state.ready) {
|
||||||
return (
|
return (
|
||||||
@@ -58,8 +52,6 @@ export const DAGGraphBoardInner: FC<DAGGraphBoardProps> = ({
|
|||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
// this hack avoids breakage on when zooming
|
|
||||||
// const prefix = Date.now();
|
|
||||||
const elements = {
|
const elements = {
|
||||||
nodes: state.data.elements.nodes,
|
nodes: state.data.elements.nodes,
|
||||||
edges: state.data.elements.edges,
|
edges: state.data.elements.edges,
|
||||||
|
|||||||
Reference in new issue
Block a user