From d6022276798fa69c30139cd9e93c5c1f37e0397c Mon Sep 17 00:00:00 2001 From: "Thomas F. K. Jorna" Date: Mon, 19 Jul 2021 02:46:25 +0200 Subject: seperate 3d and local from physics --- app/screens/graph/graph-screen.tsx | 38 +++++++++++++++++++++++++++++++------- 1 file changed, 31 insertions(+), 7 deletions(-) (limited to 'app/screens/graph') diff --git a/app/screens/graph/graph-screen.tsx b/app/screens/graph/graph-screen.tsx index c578fd4..cee0bf7 100644 --- a/app/screens/graph/graph-screen.tsx +++ b/app/screens/graph/graph-screen.tsx @@ -24,6 +24,7 @@ const ROOT: ViewStyle = { import { LocalButton } from "../../components/" import { GraphUi } from "../../components/graph-ui/graph-ui" +import { Switch } from "react-native-elements" export const GraphScreen = observer(function GraphScreen() { // Pull in one of our MST stores // const { someStore, anotherStore } = useStores() @@ -40,10 +41,8 @@ export const GraphScreen = observer(function GraphScreen() { collision: true, linkStrength: 0.1, linkIts: 1, - collapse: false, - threedim: false, particles: 2, - linkOpacity: 1, + linkOpacity: 0.4, linkWidth: 1, particleWidth: 4, nodeRel: 4, @@ -58,7 +57,6 @@ export const GraphScreen = observer(function GraphScreen() { colorful: true, galaxy: true, rootId: 0, - local: false, } const getData = async () => { @@ -167,17 +165,43 @@ export const GraphScreen = observer(function GraphScreen() { //setGraphData(rando); }) }, []) + + const [threeDim, setThreeDim] = useState(false); + const [local, setLocal] = useState(false); + if (!graphData) { return null } else { return ( - + - + + + + + { + setThreeDim(!threeDim) + }} + /> + + + setPhysics={setPhysics} physics={physics} gData={graphData} nodeIds={nodeIds} + threeDim={threeDim} setThreeDim={setThreeDim} + local={local} setLocal={setLocal}/> ) -- cgit v1.2.3