From 0f9f3daa3b1cd4bd1a795c61aa9fa3abf5c2ed5e Mon Sep 17 00:00:00 2001 From: Kirill Rogovoy Date: Thu, 29 Jul 2021 18:55:46 +0300 Subject: Bring back label backgrounds --- pages/index.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'pages/index.tsx') diff --git a/pages/index.tsx b/pages/index.tsx index 2b1ba62..6fc83e2 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -584,7 +584,8 @@ export const Graph = forwardRef(function (props: GraphProps, graphRef: any) { ? Math.max(fadeFactor, opacity) : 1 * fadeFactor * (-1 * (0.5 * opacity - 1)) } - if (physics.labels === 2 && (wasHighlightedNode || highlightedNodes[node.id!])) { + + if (physics.labels === 2) { const backgroundOpacity = 0.5 * getLabelOpacity() ctx.fillStyle = `rgba(20, 20, 20, ${backgroundOpacity})` ctx.fillRect( -- cgit v1.2.3