summaryrefslogtreecommitdiff
path: root/pages/index.tsx
diff options
context:
space:
mode:
authorThomas F. K. Jorna <[email protected]>2021-07-22 16:24:22 +0200
committerThomas F. K. Jorna <[email protected]>2021-07-22 16:24:22 +0200
commit7c1d531016087f71204eef85244c2aada0f12293 (patch)
tree9677982bf9cd375c757bf2abbee5205811e58237 /pages/index.tsx
parenta9edb982f57cd5ed6676986bcf06555d150a28ab (diff)
add visual options
Diffstat (limited to 'pages/index.tsx')
-rw-r--r--pages/index.tsx42
1 files changed, 42 insertions, 0 deletions
diff --git a/pages/index.tsx b/pages/index.tsx
index 70bb568..c3b2100 100644
--- a/pages/index.tsx
+++ b/pages/index.tsx
@@ -414,6 +414,48 @@ export const Tweaks = function (props: TweakProps) {
divider={<StackDivider borderColor="gray.200" />}
align="stretch"
>
+ <SliderWithInfo
+ label="Node size"
+ value={physics.nodeRel}
+ onChange={(value) => setPhysics({ ...physics, nodeRel: value })}
+ />
+ <SliderWithInfo
+ label="Link width"
+ value={physics.linkWidth}
+ onChange={(value) => setPhysics({ ...physics, linkWidth: value })}
+ />
+ <EnableSlider
+ enableLabel="Labels"
+ enableValue={physics.labels}
+ onEnableValueChange={() => setPhysics({ ...physics, labels: !physics.labels })}
+ label="Label Appearance Scale"
+ value={physics.labelScale * 5}
+ onChange={(value) => setPhysics({ ...physics, labelScale: value / 5 })}
+ />
+ <Box>
+ <EnableSlider
+ enableLabel="Directional Particles"
+ enableValue={physics.particles ? true : false}
+ onEnableValueChange={() =>
+ setPhysics({ ...physics, labels: physics.particles ? 0 : 1 })
+ }
+ label="Particle Number"
+ value={physics.particles}
+ max={5}
+ step={1}
+ onChange={(value) => setPhysics({ ...physics, particles: value })}
+ />
+ <SliderWithInfo
+ label="Particle Size"
+ value={physics.particleWidth}
+ onChange={(value) => setPhysics({ ...physics, particleWidth: value })}
+ />
+ </Box>
+ <SliderWithInfo
+ label="Node size"
+ value={physics.nodeRel}
+ onChange={(value) => setPhysics({ ...physics, nodeRel: value })}
+ />
<Text>Ayyyy</Text>
</VStack>
</AccordionPanel>