|
@ -234,8 +234,11 @@ class LayoutEngine { |
|
|
// perturb the nodes a little bit to force the physics to kick in
|
|
|
// perturb the nodes a little bit to force the physics to kick in
|
|
|
let offset = 70; |
|
|
let offset = 70; |
|
|
for (let i = 0; i < this.body.nodeIndices.length; i++) { |
|
|
for (let i = 0; i < this.body.nodeIndices.length; i++) { |
|
|
this.body.nodes[this.body.nodeIndices[i]].x += (0.5 - this.seededRandom())*offset; |
|
|
|
|
|
this.body.nodes[this.body.nodeIndices[i]].y += (0.5 - this.seededRandom())*offset; |
|
|
|
|
|
|
|
|
// Only perturb the nodes that aren't fixed
|
|
|
|
|
|
if (this.body.nodes[this.body.nodeIndices[i]].predefinedPosition === false) { |
|
|
|
|
|
this.body.nodes[this.body.nodeIndices[i]].x += (0.5 - this.seededRandom())*offset; |
|
|
|
|
|
this.body.nodes[this.body.nodeIndices[i]].y += (0.5 - this.seededRandom())*offset; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// uncluster all clusters
|
|
|
// uncluster all clusters
|
|
|