Fix Link Force adding 2 links per pair of node
This commit is contained in:
@@ -12,7 +12,7 @@ function startLinkSimulation() {
|
||||
// Initialize link array.
|
||||
nodes = simulation.nodes();
|
||||
for (i = 0; i < nodes.length; i++) {
|
||||
for (j = 0; j < nodes.length; j++) {
|
||||
for (j = 0; j < i; j++) {
|
||||
if (i !== j) {
|
||||
links.push({
|
||||
source: nodes[i],
|
||||
|
||||
Reference in New Issue
Block a user