Skip to content

Commit

Permalink
fix: fix issue with sizing nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
juancarlosfarah committed Oct 20, 2023
1 parent b8b12e2 commit 4dbbefa
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Sizer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import Cytoscape from 'cytoscape';
import {
SHOW_EDGES_KEY,
SHOW_LABELS_KEY,
SHOW_PARENT_NODES_KEY,
SHOW_NODES_KEY,
SettingsProps,
} from './View';

Expand Down Expand Up @@ -133,8 +133,7 @@ export default function Sizer({
}, [fontSize, nodeSize, edgeSize, cy, settings, filters]);

const edgesDisabled = (n: number) => !settings[SHOW_EDGES_KEY] || n === 0;
const nodesDisabled =
!settings[SHOW_PARENT_NODES_KEY] && settings[SHOW_LABELS_KEY];
const nodesDisabled = !settings[SHOW_NODES_KEY] || settings[SHOW_LABELS_KEY];
const labelsDisabled = !settings[SHOW_LABELS_KEY];
return (
<Box sx={{ mt: 2 }}>
Expand Down

0 comments on commit 4dbbefa

Please sign in to comment.