Skip to content

Commit

Permalink
fix(graph): fix node label when not highlighted
Browse files Browse the repository at this point in the history
  • Loading branch information
ahonestla committed Dec 5, 2023
1 parent c8838e9 commit 2130077
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions client/src/layout/Graph.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ const highlightGraph = (graph, selectedNode) => {
(node, attr) => ({
...attr,
highlighted: node === selectedNode.id,
label: node === selectedNode.id || graph.neighbors(selectedNode.id).includes(node) ? attr.label : '',
color: node === selectedNode.id || graph.neighbors(selectedNode.id).includes(node) ? attr.color : '#E2E2E2',
}),
{ attributes: ['highlighted', 'color'] },
Expand Down

0 comments on commit 2130077

Please sign in to comment.