diff options
author | Kirill Rogovoy <[email protected]> | 2021-07-30 10:03:01 +0300 |
---|---|---|
committer | Kirill Rogovoy <[email protected]> | 2021-07-30 10:03:01 +0300 |
commit | 634d347187f44bbed0232dc3400a6d4338e41641 (patch) | |
tree | f63ac069eeb0d2bf541d7780ca0b3889e93793a2 /pages | |
parent | 8ed19d4e9a29aa94192aa68813648fe607d005af (diff) |
Prevent graph from shivering on click
Diffstat (limited to 'pages')
-rw-r--r-- | pages/index.tsx | 3 |
1 files changed, 3 insertions, 0 deletions
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], |