Skip to content

Commit

Permalink
fix: issue with layout
Browse files Browse the repository at this point in the history
  • Loading branch information
juancarlosfarah committed Sep 14, 2023
1 parent f1c4d9b commit fec6698
Showing 1 changed file with 10 additions and 18 deletions.
28 changes: 10 additions & 18 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,16 +90,8 @@ const App = () => {
const [minWeight, setMinWeight] = useState<Number>(Math.min(...weights));
const [maxWeight, setMaxWeight] = useState<Number>(Math.max(...weights));

useEffect(() => {
// anything in here is fired on component mount.

return () => {
// anything in here is fired on component unmount.
};
}, []);

// const layout = { name: 'fcose' };
const layout = { name: 'cola' };
const layout = { name: 'fcose' };
// const layout = { name: 'cola' };
// const layout = { name: 'random' };
// const layout = { name: 'cose' };
// const layout = { name: 'circle' };
Expand Down Expand Up @@ -240,14 +232,14 @@ const App = () => {
.update();
}

if (
settings[SHOW_NODES_KEY] ||
settings[SHOW_PARENT_NODES_KEY] ||
settings[SHOW_EDGES_KEY]
) {
const l = cyHandle.layout(layout);
l.run();
}
// if (
// settings[SHOW_NODES_KEY] ||
// settings[SHOW_PARENT_NODES_KEY] ||
// settings[SHOW_EDGES_KEY]
// ) {
// const l = cyHandle.layout(layout);
// l.run();
// }
}

return () => {
Expand Down

0 comments on commit fec6698

Please sign in to comment.