diff options
author | Thomas F. K. Jorna <[email protected]> | 2021-07-15 19:30:13 +0200 |
---|---|---|
committer | Thomas F. K. Jorna <[email protected]> | 2021-07-15 19:30:13 +0200 |
commit | f07cb0d2745f59fe07254698402b160e7535c641 (patch) | |
tree | da44cab1034ebb5e547f90b90708c5d343c20ecc /app/components/graph | |
parent | f430e26a3e553e31bc7e31f7b6d3339ceb0cac08 (diff) |
cleaned up tweak menu, added particle toggle
Diffstat (limited to 'app/components/graph')
-rw-r--r-- | app/components/graph/graph.tsx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/components/graph/graph.tsx b/app/components/graph/graph.tsx index cd623ee..14e3b60 100644 --- a/app/components/graph/graph.tsx +++ b/app/components/graph/graph.tsx @@ -61,6 +61,7 @@ export const Graph = observer(function Graph(props: GraphProps): JSX.Element { fg.d3Force("charge").strength(physics.charge) }) + // For the expandable version of the graph const rootId = 0 const nodesById = useMemo(() => { @@ -183,7 +184,7 @@ export const Graph = observer(function Graph(props: GraphProps): JSX.Element { // nodeAutoColorBy={d => d.id%GROUPS} linkAutoColorBy={(d) => rando.nodes[d.source].id % GROUPS} linkColor={"#ffffff"} - linkDirectionalParticles={2} + linkDirectionalParticles={physics.particles} nodeColor={(node) => !node.childLinks.length ? "green" : node.collapsed ? "red" : "yellow" } @@ -200,7 +201,7 @@ export const Graph = observer(function Graph(props: GraphProps): JSX.Element { linkAutoColorBy={(d) => rando.nodes[d.source].id % GROUPS} linkColor={"#ffffff"} linkWidth={2} - linkDirectionalParticles={2} + linkDirectionalParticles={physics.particles} nodeColor={(node) => !node.childLinks.length ? "green" : node.collapsed ? "red" : "yellow" } |