From 7fe07246ff2facb32fdaa32f4ab71cce4f92dcc7 Mon Sep 17 00:00:00 2001 From: "Thomas F. K. Jorna" Date: Mon, 13 Sep 2021 15:50:12 +0200 Subject: fix: labels did not scale anymore --- pages/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pages/index.tsx') 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) { -- cgit v1.2.3