diff options
author | Thomas F. K. Jorna <[email protected]> | 2021-07-25 02:17:34 +0200 |
---|---|---|
committer | Thomas F. K. Jorna <[email protected]> | 2021-07-25 02:17:34 +0200 |
commit | 8e62a91601a2b9782db952fe6a8e64ef153c3288 (patch) | |
tree | 04ff52f0f68074279449bf94f699acb269f11866 | |
parent | ebaad8c293c51a95a78a7674c6cd26998357d09b (diff) |
3d's back baby
-rw-r--r-- | pages/index.tsx | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/pages/index.tsx b/pages/index.tsx index a60ecd5..22adb3f 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -205,7 +205,7 @@ export function GraphPage() { } return ( - <div> + <Box display="flex" justifyContent="space-between"> {showTweaks ? ( <Tweaks {...{ @@ -229,6 +229,17 @@ export function GraphPage() { /> </Box> )} + <Button + position="absolute" + marginRight="2%" + marginTop="2%" + zIndex="overlay" + marginLeft="95%" + onClick={() => setThreeDim(!threeDim)} + colorScheme="purple" + > + {threeDim ? '3D' : '2D'}{' '} + </Button> <Graph nodeById={nodeByIdRef.current!} linksByNodeId={linksByNodeIdRef.current!} @@ -240,7 +251,7 @@ export function GraphPage() { filter, }} /> - </div> + </Box> ) } @@ -357,13 +368,13 @@ export interface TweakProps { physics: typeof initialPhysics setPhysics: any threeDim: boolean - setTreedim: (boolean) => void + setThreedim: (boolean) => void filter: typeof initialFilter setFilter: any onClose: () => void } export const Tweaks = (props: TweakProps) => { - const { physics, setPhysics, threeDim, setThreeDim, filter, setFilter, onClose } = props + const { physics, setPhysics, threeDim, filter, setFilter, onClose } = props return ( <Box zIndex="overlay" |