Jacky Zhao
2022-08-05 3dcc1f1106c1ad81cf6cd0a45f51249d719d694f
feat: better graph scaling (closes #170)
1 files modified
2 ■■■ changed files
assets/js/graph.js 2 ●●● patch | view | raw | blame | history
assets/js/graph.js
@@ -155,7 +155,7 @@
  const nodeRadius = (d) => {
    const numOut = index.links[d.id]?.length || 0
    const numIn = index.backlinks[d.id]?.length || 0
    return 3 + (numOut + numIn) / 4
    return 2 + Math.sqrt(numOut + numIn)
  }
  // draw individual nodes