summaryrefslogtreecommitdiff
path: root/pages
diff options
context:
space:
mode:
authorThomas F. K. Jorna <[email protected]>2021-07-29 08:45:03 +0200
committerThomas F. K. Jorna <[email protected]>2021-07-29 08:45:03 +0200
commit12acf900cb43925edcaea4cfda95d9a3701af358 (patch)
treec874415b3f153c32c5f5bcb430b7940833aabf00 /pages
parent3f74b363164c16c3b5301ad731ba25aba07fabd2 (diff)
fixed highlighting bug
Diffstat (limited to 'pages')
-rw-r--r--pages/index.tsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/pages/index.tsx b/pages/index.tsx
index 97f76af..69885e7 100644
--- a/pages/index.tsx
+++ b/pages/index.tsx
@@ -452,7 +452,7 @@ export const Graph = function (props: GraphProps) {
const previouslyHighlightedLinks = useMemo(
() => linksByNodeId[lastHoverNode.current?.id!] ?? [],
- [hoverNode],
+ [JSON.stringify(hoverNode), lastHoverNode.current],
)
const previouslyHighlightedNodes = useMemo(
@@ -463,7 +463,7 @@ export const Graph = function (props: GraphProps) {
...previouslyHighlightedLinks.flatMap((link) => [link.source, link.target]),
].map((nodeId) => [nodeId, {}]),
),
- [hoverNode, previouslyHighlightedLinks, lastHoverNode.current],
+ [JSON.stringify(hoverNode), previouslyHighlightedLinks, lastHoverNode.current],
)
const getNodeColorById = (id: string) => {