summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--components/tweaks.tsx13
-rw-r--r--pages/index.tsx13
2 files changed, 4 insertions, 22 deletions
diff --git a/components/tweaks.tsx b/components/tweaks.tsx
index 393a0fe..e7653df 100644
--- a/components/tweaks.tsx
+++ b/components/tweaks.tsx
@@ -1072,31 +1072,24 @@ export const Tweaks = (props: TweakProps) => {
<SliderWithInfo
label="Animation speed"
onChange={(v) => setVisuals({ ...visuals, animationSpeed: v })}
- value={physics.animationSpeed}
+ value={visuals.animationSpeed}
infoText="Slower speed has a chance of being buggy"
min={50}
max={1000}
step={10}
/>
<Select
- placeholder={physics.algorithmName}
+ placeholder={visuals.algorithmName}
onChange={(v) => {
setVisuals({ ...visuals, algorithmName: v.target.value })
}}
>
- {physics.algorithmOptions.map((opt: string) => (
+ {visuals.algorithmOptions.map((opt: string) => (
<option key={opt} value={opt}>
{opt}
</option>
))}
</Select>
- {/* <DropDownMenu
- displayValue={physics.algorithmName}
- textArray={physics.algorithmOptions}
- onClickArray={physics.algorithmOptions.map((option) =>
- setVisuals({ ...visuals, algorithmName: { option } }),
- )}
- /> */}
</EnableSection>
</VStack>
</EnableSection>
diff --git a/pages/index.tsx b/pages/index.tsx
index 4ff3aee..75e6b17 100644
--- a/pages/index.tsx
+++ b/pages/index.tsx
@@ -309,7 +309,7 @@ export const Graph = forwardRef(function (props: GraphProps, graphRef: any) {
return false
}
- return !links.some((link) => !['parent', 'cite'].includes(link.type))
+ return links.some((link) => !['parent', 'cite', 'ref'].includes(link.type))
})
const filteredLinks = graphData.links.filter((linkArg) => {
@@ -355,17 +355,6 @@ export const Graph = forwardRef(function (props: GraphProps, graphRef: any) {
if (physics.gravityOn) {
fg.d3Force('x', d3.forceX().strength(physics.gravity))
fg.d3Force('y', d3.forceY().strength(physics.gravity))
- if (threeDim) {
- if (physics.galaxy) {
- fg.d3Force('x', d3.forceX().strength(physics.gravity / 5))
- fg.d3Force('z', d3.forceZ().strength(physics.gravity / 5))
- } else {
- fg.d3Force('x', d3.forceX().strength(physics.gravity))
- fg.d3Force('z', d3.forceZ().strength(physics.gravity))
- }
- } else {
- fg.d3Force('z', null)
- }
} else {
fg.d3Force('x', null)
fg.d3Force('y', null)