summaryrefslogtreecommitdiff
path: root/pages
diff options
context:
space:
mode:
authorThomas F. K. Jorna <[email protected]>2021-07-21 12:43:51 +0200
committerThomas F. K. Jorna <[email protected]>2021-07-21 12:43:51 +0200
commit2898f25169460bfe483cda96b3b6ad6a66331a8a (patch)
tree35d844468a0a7b4a2ba05890c83cf6275584dd11 /pages
parentc2124abcaae4d4155a99a15fbcb2c42338827c80 (diff)
added chakra and disabled particles by default
Diffstat (limited to 'pages')
-rw-r--r--pages/_app.tsx7
-rw-r--r--pages/index.tsx4
2 files changed, 8 insertions, 3 deletions
diff --git a/pages/_app.tsx b/pages/_app.tsx
index 945e892..1801159 100644
--- a/pages/_app.tsx
+++ b/pages/_app.tsx
@@ -1,7 +1,12 @@
import '../styles/globals.css'
import type { AppProps } from 'next/app'
+import { ChakraProvider } from '@chakra-ui/react'
function MyApp({ Component, pageProps }: AppProps) {
- return <Component {...pageProps} />
+ return (
+ <ChakraProvider>
+ <Component {...pageProps} />
+ </ChakraProvider>
+ )
}
export default MyApp
diff --git a/pages/index.tsx b/pages/index.tsx
index 9a22128..fb15ddc 100644
--- a/pages/index.tsx
+++ b/pages/index.tsx
@@ -23,7 +23,7 @@ const initialPhysics = {
collision: true,
linkStrength: 0.1,
linkIts: 1,
- particles: 2,
+ particles: 0,
linkOpacity: 0.4,
linkWidth: 1,
particleWidth: 4,
@@ -289,6 +289,7 @@ export const Graph = function (props: GraphProps) {
return linkIsHighlighted ? '#a991f1' : 'rgb(50, 50, 50, 0.2)'
}}
linkDirectionalParticles={physics.particles}
+ linkDirectionalParticleWidth={physics.particleWidth}
nodeLabel={(node) => (node as OrgRoamNode).title}
linkWidth={(link) => {
const linkIsHighlighted =
@@ -304,7 +305,6 @@ export const Graph = function (props: GraphProps) {
const highlightSize = highlightedNodes[node.id!] ? 2 : 0
return basicSize + highlightSize
}}
- linkDirectionalParticleWidth={physics.particleWidth}
nodeCanvasObject={(node, ctx, globalScale) => {
if (!physics.labels) {
return