From 1da75b17e31940f212a8a49aadf442547b05691a Mon Sep 17 00:00:00 2001 From: Kirill Rogovoy Date: Fri, 30 Jul 2021 10:47:29 +0300 Subject: Update graph on file save --- pages/index.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'pages') diff --git a/pages/index.tsx b/pages/index.tsx index 66dd30b..afd0ed3 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -342,7 +342,7 @@ export const Graph = forwardRef(function (props: GraphProps, graphRef: any) { nodes: scopedNodes, links: scopedLinks, } - }, [filter, scope, JSON.stringify(Object.keys(nodeById))]) + }, [filter, scope, graphData]) useEffect(() => { ;(async () => { @@ -631,7 +631,6 @@ export const Graph = forwardRef(function (props: GraphProps, graphRef: any) { d3VelocityDecay: physics.velocityDecay, onNodeClick: (node: NodeObject, event: any) => { - event.preventDefault() const isDoubleClick = event.timeStamp - lastNodeClickRef.current < 400 lastNodeClickRef.current = event.timeStamp -- cgit v1.2.3