From 634d347187f44bbed0232dc3400a6d4338e41641 Mon Sep 17 00:00:00 2001 From: Kirill Rogovoy Date: Fri, 30 Jul 2021 10:03:01 +0300 Subject: Prevent graph from shivering on click --- pages/index.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pages/index.tsx b/pages/index.tsx index 8a9f39d..66dd30b 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -639,6 +639,9 @@ export const Graph = forwardRef(function (props: GraphProps, graphRef: any) { window.open('org-protocol://roam-node?node=' + node.id, '_self') return } + if (scope.nodeIds.includes(node.id as string)) { + return + } setScope((currentScope) => ({ ...currentScope, nodeIds: [...currentScope.nodeIds, node.id as string], -- cgit v1.2.3