|
@ -149,10 +149,10 @@ class LayoutEngine { |
|
|
let node = nodesArray[i]; |
|
|
let node = nodesArray[i]; |
|
|
let radius = 10 * 0.1 * nodesArray.length + 10; |
|
|
let radius = 10 * 0.1 * nodesArray.length + 10; |
|
|
let angle = 2 * Math.PI * this.seededRandom(); |
|
|
let angle = 2 * Math.PI * this.seededRandom(); |
|
|
if (node.options.fixed.x === false || node.x === undefined) { |
|
|
|
|
|
|
|
|
if (node.x === undefined) { |
|
|
node.x = radius * Math.cos(angle); |
|
|
node.x = radius * Math.cos(angle); |
|
|
} |
|
|
} |
|
|
if (node.options.fixed.x === false || node.y === undefined) { |
|
|
|
|
|
|
|
|
if (node.y === undefined) { |
|
|
node.y = radius * Math.sin(angle); |
|
|
node.y = radius * Math.sin(angle); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|