Skip to content

Commit

Permalink
small: fix initial random position of nodes in simulation
Browse files Browse the repository at this point in the history
was coming from one corner before
  • Loading branch information
mrkvon committed Jul 21, 2021
1 parent 0727b62 commit 79e9ca1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/simulation/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ export default class Simulation {
Object.fromEntries(this.nodes.map(node => [node.uri, node]))
const updatedNodes: SimulationNodeExt[] = nodes.map(node => ({
...node,
x: Math.random() * 400,
y: Math.random() * 400,
x: (0.5 - Math.random()) * 800,
y: (0.5 - Math.random()) * 800,
...thisNodeDict[node.uri],
r: node.r,
}))
Expand Down

0 comments on commit 79e9ca1

Please sign in to comment.