Skip to content
Snippets Groups Projects
Commit 189dfc93 authored by Maximilian Giller's avatar Maximilian Giller :squid:
Browse files

Adjusted rendering of labels

parent 1f4df4a7
No related branches found
No related tags found
1 merge request!2Implemented editor in the react framework
Pipeline #56900 passed
......@@ -305,7 +305,12 @@ export class Editor extends React.PureComponent<propTypes, stateTypes> {
}
// Draw label
if (this.state.visibleLabels) {
const isNodeRelatedToSelection: boolean =
this.state.selectedNode === undefined ||
this.isHighlighted(node) ||
this.state.selectedNode.neighbors.includes(node);
if (this.state.visibleLabels && isNodeRelatedToSelection) {
const label = node.label;
const fontSize = 11 / globalScale;
ctx.font = `${fontSize}px Sans-Serif`;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment