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 7acb54d commit 7907a07
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions js/graph.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@ const Graph = ForceGraph()(document.getElementById("graph"))
// if mobile zoom to about...

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

// Contain nodes to a box.
Expand Down

0 comments on commit 7907a07

Please sign in to comment.