summaryrefslogtreecommitdiff
path: root/pages/index.tsx
diff options
context:
space:
mode:
authorThomas F. K. Jorna <[email protected]>2021-07-22 19:50:27 +0200
committerThomas F. K. Jorna <[email protected]>2021-07-22 19:50:27 +0200
commit0ba686b64fcdbedffd636791e6d20d8eb1791693 (patch)
tree7ab8236d5099390bfcbd7dadc06756442345dcd1 /pages/index.tsx
parentbaf30cbfe147a936d36d25f61fd2d1088dbd7418 (diff)
more merging
Diffstat (limited to 'pages/index.tsx')
-rw-r--r--pages/index.tsx16
1 files changed, 6 insertions, 10 deletions
diff --git a/pages/index.tsx b/pages/index.tsx
index 16a0f31..75f2db7 100644
--- a/pages/index.tsx
+++ b/pages/index.tsx
@@ -287,7 +287,7 @@ export interface TweakProps {
setPhysics: any
threeDim: boolean
}
-export const Tweaks = function(props: TweakProps) {
+export const Tweaks = function (props: TweakProps) {
const { physics, setPhysics, threeDim } = props
return (
<Box
@@ -535,7 +535,7 @@ export interface GraphProps {
emacsNodeId: string | null
}
-export const Graph = function(props: GraphProps) {
+export const Graph = function (props: GraphProps) {
const { physics, graphData, threeDim, linksByNodeId, emacsNodeId } = props
const graph2dRef = useRef<any>(null)
@@ -603,12 +603,12 @@ export const Graph = function(props: GraphProps) {
scope.nodeIds.length === 0
? graphData
: {
- nodes: scopedNodes,
- links: scopedLinks,
- }
+ nodes: scopedNodes,
+ links: scopedLinks,
+ }
useEffect(() => {
- ; (async () => {
+ ;(async () => {
const fg = threeDim ? graph3dRef.current : graph2dRef.current
const d3 = await d3promise
if (physics.gravityOn) {
@@ -699,13 +699,9 @@ export const Graph = function(props: GraphProps) {
nodeRelSize: physics.nodeRel,
nodeVal: (node) => {
const links = linksByNodeId[node.id!] ?? []
-<<<<<<< variant A
const basicSize = 3 + links.length
const highlightSize = highlightedNodes[node.id!] ? physics.highlightNodeSize : 1
return basicSize * highlightSize
->>>>>>> variant B
- return 3 + links.length
-======= end
},
nodeCanvasObject: (node, ctx, globalScale) => {
if (!physics.labels) {