summaryrefslogtreecommitdiff
path: root/pages
diff options
context:
space:
mode:
authorKirill Rogovoy <[email protected]>2021-07-30 10:47:29 +0300
committerKirill Rogovoy <[email protected]>2021-07-30 10:47:29 +0300
commit1da75b17e31940f212a8a49aadf442547b05691a (patch)
tree20d8c69f7d8fa366dffa2d88ae0a8466bdc06fa2 /pages
parent634d347187f44bbed0232dc3400a6d4338e41641 (diff)
Update graph on file save
Diffstat (limited to 'pages')
-rw-r--r--pages/index.tsx3
1 files changed, 1 insertions, 2 deletions
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