summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorThomas F. K. Jorna <[email protected]>2021-09-13 15:36:03 +0200
committerThomas F. K. Jorna <[email protected]>2021-09-13 15:36:03 +0200
commit7a466db2a3732bf63c6a9ac1c550e8539580554a (patch)
tree29947d6e47c957bfb8f76d7adaf29472b06d4cac /components
parentb07e23ab05f1ad68b94f58a748dd18d351143056 (diff)
feat: node scale oom invariance
Diffstat (limited to 'components')
-rw-r--r--components/config.ts1
-rw-r--r--components/tweaks.tsx13
2 files changed, 14 insertions, 0 deletions
diff --git a/components/config.ts b/components/config.ts
index dce9b7d..56664df 100644
--- a/components/config.ts
+++ b/components/config.ts
@@ -103,6 +103,7 @@ export const initialVisuals = {
refLinkHighlightColor: '',
refNodeColor: 'black',
nodeSizeLinks: 0.5,
+ nodeZoomSize: 1.3,
}
export interface TagColors {
diff --git a/components/tweaks.tsx b/components/tweaks.tsx
index e03cea5..f03339b 100644
--- a/components/tweaks.tsx
+++ b/components/tweaks.tsx
@@ -761,6 +761,19 @@ export const Tweaks = (props: TweakProps) => {
max={2}
onChange={(value) => setVisuals({ ...visuals, nodeSizeLinks: value })}
/>
+ <SliderWithInfo
+ label="Node zoom invariance"
+ value={visuals.nodeZoomSize}
+ min={0}
+ max={2}
+ infoText="How much the graph will try to keep the nodesize consistent across zoom scales. 0 is no consistency, node will always be their true size, 1 is linear, 2 is quadratic."
+ onChange={(value) =>
+ setVisuals((prev: typeof initialVisuals) => ({
+ ...prev,
+ nodeZoomSize: value,
+ }))
+ }
+ />
{threeDim && (
<>
<SliderWithInfo