Skip to content

Commit

Permalink
Update graph.js
Browse files Browse the repository at this point in the history
  • Loading branch information
imaitland authored Feb 7, 2024
1 parent a22463f commit 0e1012d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion js/graph.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ const Graph = ForceGraph()(document.getElementById("graph"))
// if mobile zoom to about...

// Center/zoom on node
const rootNode = graph_data.nodes.find((node)=>{node.id === "about"})
const rootNode = graph_data.nodes.find((node)=>{return node.id === "about"})
console.log("R", rootNode);
Graph.centerAt(rootNode.x, rootNode.y, 1000);
Graph.zoom(8, 2000);
})
Expand Down

0 comments on commit 0e1012d

Please sign in to comment.