From 50f1d2a42d165f02fc7bcebf6c2d4e4c1301f09e Mon Sep 17 00:00:00 2001 From: Ari Date: Thu, 14 Jul 2022 16:02:14 -0400 Subject: [PATCH] clean up --- webapp/src/components/DAGGraph/board/index.tsx | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/webapp/src/components/DAGGraph/board/index.tsx b/webapp/src/components/DAGGraph/board/index.tsx index e93d0a4..f93e340 100644 --- a/webapp/src/components/DAGGraph/board/index.tsx +++ b/webapp/src/components/DAGGraph/board/index.tsx @@ -1,12 +1,8 @@ import "./index.css"; -import { FC, useRef } from "react"; +import { FC } from "react"; import CircularProgress from "@mui/material/CircularProgress"; -import ReactFlow, { - Controls, - ReactFlowProvider, - useViewport, -} from "react-flow-renderer"; +import ReactFlow, { Controls, ReactFlowProvider } from "react-flow-renderer"; import { NodeEditor } from "components/NodeEditor"; import { Modal } from "components/Modal"; @@ -27,8 +23,6 @@ export const DAGGraphBoardInner: FC = ({ state, closeModal, }) => { - const { zoom } = useViewport(); - const lastZoom = useRef(zoom); // render unready or errored states if (!state.ready) { return ( @@ -58,8 +52,6 @@ export const DAGGraphBoardInner: FC = ({ /> ); } - // this hack avoids breakage on when zooming - // const prefix = Date.now(); const elements = { nodes: state.data.elements.nodes, edges: state.data.elements.edges,