From edf7afa78316ed8c6574ebbd7668c6e65001859e Mon Sep 17 00:00:00 2001 From: "Thomas F. K. Jorna" Date: Mon, 26 Jul 2021 17:15:25 +0200 Subject: removed mouse and file viewer customizaton --- components/tweaks.tsx | 104 ++++++-------------------------------------------- 1 file changed, 11 insertions(+), 93 deletions(-) (limited to 'components') diff --git a/components/tweaks.tsx b/components/tweaks.tsx index a26d479..43a8ecf 100644 --- a/components/tweaks.tsx +++ b/components/tweaks.tsx @@ -12,9 +12,7 @@ import { AccordionItem, AccordionPanel, Box, - BoxProps, Button, - CloseButton, Flex, IconButton, Menu, @@ -31,14 +29,12 @@ import { Text, Tooltip, VStack, - useDisclosure, Heading, - SlideFade, Collapse, } from '@chakra-ui/react' import React, { useState } from 'react' import Scrollbars from 'react-custom-scrollbars-2' -import { initialPhysics, initialFilter, initialMouse } from './config' +import { initialPhysics, initialFilter } from './config' export interface TweakProps { physics: typeof initialPhysics @@ -47,14 +43,11 @@ export interface TweakProps { setThreeDim: (newValue: boolean) => void filter: typeof initialFilter setFilter: any - mouse: typeof initialMouse - setMouse: any } export const Tweaks = (props: TweakProps) => { - const { physics, setPhysics, threeDim, setThreeDim, mouse, setMouse, filter, setFilter } = props + const { physics, setPhysics, threeDim, setThreeDim, filter, setFilter } = props const [showTweaks, setShowTweaks] = useState(true) - const mouseArray = ['Never', 'Hover', 'Click', 'Double Click', 'Right Click'] return ( <> @@ -91,7 +84,6 @@ export const Tweaks = (props: TweakProps) => { colorScheme="purple" variant={threeDim ? 'solid' : 'outline'} zIndex="overlay" - variant="ghost" > {threeDim ? '2D' : '3D'} @@ -337,7 +329,7 @@ export const Tweaks = (props: TweakProps) => { - 1} animateOpactiy> + 1} animateOpacity> { setPhysics({ ...physics, algorithmName: v.target.value }) }} > - {physics.algorithmOptions.map((opt, i) => ( - - ))} + {physics.algorithmOptions.map((opt: string, i: number) => { + return ( + + ) + })} {/* { align="stretch" paddingLeft={7} color="gray.800" - > - - - Open preview window on... - - - - }> - {mouseArray[mouse.open]} - - - setMouse({ ...mouse, open: 0 })}>Never - setMouse({ ...mouse, open: 1 })}>Hover - setMouse({ ...mouse, open: 2 })}>Click - setMouse({ ...mouse, open: 3 })}> - Double Click - - setMouse({ ...mouse, open: 4 })}> - Right Click - - - - - - - Enter local graph on... - - - - }> - {mouseArray[mouse.local]} - - - setMouse({ ...mouse, local: 0 })}> - Never - - setMouse({ ...mouse, local: 1 })}> - Hover - - setMouse({ ...mouse, local: 2 })}> - Click - - setMouse({ ...mouse, local: 3 })}> - Double Click - - setMouse({ ...mouse, local: 4 })}> - Right Click - - - - - - Open node in emacs on... - - }> - {mouseArray[mouse.follow]} - - - setMouse({ ...mouse, follow: 0 })}> - Never - - setMouse({ ...mouse, follow: 1 })}> - Hover - - setMouse({ ...mouse, follow: 2 })}> - Click - - setMouse({ ...mouse, follow: 3 })}> - Double Click - - setMouse({ ...mouse, follow: 4 })}> - Right Click - - - - - + > -- cgit v1.2.3