From 44248cb4eb0839a111e9f5db91c96b707d76d78e Mon Sep 17 00:00:00 2001
From: "Thomas F. K. Jorna" <thomasfkjorna@gmail.com>
Date: Fri, 23 Jul 2021 16:38:14 +0200
Subject: add orphan toggle

---
 pages/index.tsx | 10 ++++++++++
 1 file changed, 10 insertions(+)

(limited to 'pages/index.tsx')

diff --git a/pages/index.tsx b/pages/index.tsx
index 170935e..8462d31 100644
--- a/pages/index.tsx
+++ b/pages/index.tsx
@@ -444,6 +444,16 @@ export const Tweaks = function (props: TweakProps) {
                 divider={<StackDivider borderColor="gray.200" />}
                 align="stretch"
               >
+                <Box>
+                  <Text>Kill orphans</Text>
+                  <Switch
+                    colorScheme="purple"
+                    onChange={() => {
+                      setPhysics({ ...physics, orphans: !physics.orphans })
+                    }}
+                    isChecked={physics.orphans}
+                  ></Switch>
+                </Box>
                 <SliderWithInfo
                   label="Node size"
                   value={physics.nodeRel}
-- 
cgit v1.2.3

