summaryrefslogtreecommitdiff
path: root/app/components/graph/graph.tsx
diff options
context:
space:
mode:
authorThomas F. K. Jorna <[email protected]>2021-07-15 22:48:14 +0200
committerThomas F. K. Jorna <[email protected]>2021-07-15 22:48:14 +0200
commit6e3ba4f86bf3f25d27af66cfcd4f5739e767b208 (patch)
tree2203722cf4c9a856a8d07fbb5e281a0497505766 /app/components/graph/graph.tsx
parent021f8a2e5a75e392f2f677175008e29f1834c28c (diff)
prevent data writing every update
Diffstat (limited to 'app/components/graph/graph.tsx')
-rw-r--r--app/components/graph/graph.tsx9
1 files changed, 8 insertions, 1 deletions
diff --git a/app/components/graph/graph.tsx b/app/components/graph/graph.tsx
index 14e3b60..72b9eea 100644
--- a/app/components/graph/graph.tsx
+++ b/app/components/graph/graph.tsx
@@ -192,6 +192,10 @@ export const Graph = observer(function Graph(props: GraphProps): JSX.Element {
nodeLabel={(node) => "label"}
// nodeVal ={(node)=> node.childLinks.length * 0.5 + 1}
//d3VelocityDecay={visco}
+ linkWidth={physics.linkWidth}
+ linkOpacity={physics.linkOpacity}
+ nodeRelSize={physics.nodeRel}
+ linkDirectionalParticleWidth={physics.particleWidth}
/>
) : (
<ForceGraph3D
@@ -207,8 +211,11 @@ export const Graph = observer(function Graph(props: GraphProps): JSX.Element {
}
onNodeClick={!physics.collapse ? null : handleNodeClick}
nodeVal={(node) => node.childLinks.length + 1}
- linkOpacity={0.8}
//d3VelocityDecay={visco}
+ linkWidth={physics.linkWidth}
+ linkOpacity={physics.linkOpacity}
+ nodeRelSize={physics.nodeRel}
+ linkDirectionalParticleWidth={physics.particleWidth}
/>
)}
</View>