diff options
author | Thomas F. K. Jorna <[email protected]> | 2021-09-13 15:50:12 +0200 |
---|---|---|
committer | Thomas F. K. Jorna <[email protected]> | 2021-09-13 15:50:12 +0200 |
commit | 7fe07246ff2facb32fdaa32f4ab71cce4f92dcc7 (patch) | |
tree | db7f05c123a8795c38c8113a9afe32d89d3507c7 /pages/index.tsx | |
parent | 7a466db2a3732bf63c6a9ac1c550e8539580554a (diff) |
fix: labels did not scale anymore
Diffstat (limited to 'pages/index.tsx')
-rw-r--r-- | pages/index.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pages/index.tsx b/pages/index.tsx index 2f3881e..c7f3c42 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -964,7 +964,7 @@ export const Graph = forwardRef(function (props: GraphProps, graphRef: any) { highlightedNodes[node.id!] || previouslyHighlightedNodes[node.id!] ? 1 + opacity * (visuals.highlightNodeSize - 1) : 1 - return (basicSize * highlightSize) / Math.pow(zoom, visuals.nodeZoomSize) + return basicSize * highlightSize } const [dragging, setDragging] = useState(false) @@ -983,7 +983,7 @@ export const Graph = forwardRef(function (props: GraphProps, graphRef: any) { }, nodeRelSize: visuals.nodeRel, nodeVal: (node) => { - return nodeSize(node) + return nodeSize(node) / Math.pow(zoom, visuals.nodeZoomSize) }, nodeCanvasObject: (node, ctx, globalScale) => { if (!node) { |