From 4dea73fe10aa685303bf90606e9dbd5d0fd2e392 Mon Sep 17 00:00:00 2001 From: "Thomas F. K. Jorna" Date: Sun, 1 Aug 2021 15:29:08 +0200 Subject: added arrows --- components/config.ts | 4 +++ components/tweaks.tsx | 94 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 98 insertions(+) (limited to 'components') diff --git a/components/config.ts b/components/config.ts index cc2beb8..ac4f9c8 100644 --- a/components/config.ts +++ b/components/config.ts @@ -44,6 +44,10 @@ export const initialVisuals = { particles: false, particlesNumber: 0, particlesWidth: 4, + arrows: false, + arrowsLength: 1, + arrowsPos: 0.5, + arrowsColor: '', linkOpacity: 0.8, linkWidth: 1, nodeRel: 4, diff --git a/components/tweaks.tsx b/components/tweaks.tsx index 39130a5..b4733b8 100644 --- a/components/tweaks.tsx +++ b/components/tweaks.tsx @@ -1037,6 +1037,100 @@ export const Tweaks = (props: TweakProps) => { + setVisuals({ ...visuals, arrows: !visuals.arrows })} + > + setVisuals({ ...visuals, arrowsLength: 10 * value })} + /> + setVisuals({ ...visuals, arrowsPos: value })} + /> + + Arrow Color + + } + > + { + + } + + + {' '} + + setVisuals({ ...visuals, arrowsColor: '' })} + justifyContent="space-between" + alignItems="center" + display="flex" + > + + + {colorList.map((color) => ( + + setVisuals({ + ...visuals, + arrowsColor: color, + }) + } + justifyContent="space-between" + alignItems="center" + display="flex" + > + + + ))} + {grays.map((color) => ( + + setVisuals({ + ...visuals, + arrowsColor: color, + }) + } + justifyContent="space-between" + alignItems="center" + display="flex" + > + + + ))} + + + + +