diff options
author | Thomas F. K. Jorna <[email protected]> | 2021-07-18 02:03:35 +0200 |
---|---|---|
committer | Thomas F. K. Jorna <[email protected]> | 2021-07-18 02:03:35 +0200 |
commit | 1c00b6c649f67904fdc3fd2687a81c98b7726902 (patch) | |
tree | aebe2255838a31e6b399b4c1af7748b2e0d7b006 | |
parent | 08124aa84fdbc48b1579c37e75cb7bc69c1feff8 (diff) |
labels only when hovering in 3d
-rw-r--r-- | app/components/graph/graph.tsx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/components/graph/graph.tsx b/app/components/graph/graph.tsx index 7db642e..5925e42 100644 --- a/app/components/graph/graph.tsx +++ b/app/components/graph/graph.tsx @@ -309,13 +309,16 @@ onLinkHover={handleLinkHover} nodeThreeObject={ !physics.labels ? undefined : ((node) => { + if (highlightNodes.has(node)) { console.log(node.title) const sprite = new SpriteText(node.title.substring(0, 30)); console.log("didnt crash here 2") sprite.color = "#ffffff"; sprite.textHeight = 8; return sprite; - })} + } else { return undefined }; + }) + } nodeThreeObjectExtend={true} /> )} |