Skip to content

Commit ce0d420

Browse files
committed
Merge pull request jacomyal#707 from rangeonnicolas/master
ForceAtlas2 bug fix + correction of a unit test
2 parents 7e44d99 + 3c8a1e6 commit ce0d420

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

plugins/sigma.layout.forceAtlas2/worker.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@
492492

493493
// 2) Repulsion
494494
//--------------
495-
// NOTES: adjustSize = antiCollision & scalingRatio = coefficient
495+
// NOTES: adjustSizes = antiCollision & scalingRatio = coefficient
496496

497497
if (W.settings.barnesHutOptimize) {
498498
coefficient = W.settings.scalingRatio;
@@ -522,7 +522,7 @@
522522
xDist = NodeMatrix[np(n, 'x')] - RegionMatrix[rp(r, 'massCenterX')];
523523
yDist = NodeMatrix[np(n, 'y')] - RegionMatrix[rp(r, 'massCenterY')];
524524

525-
if (W.settings.adjustSize) {
525+
if (W.settings.adjustSizes) {
526526

527527
//-- Linear Anti-collision Repulsion
528528
if (distance > 0) {
@@ -578,7 +578,7 @@
578578

579579
distance = Math.sqrt(xDist * xDist + yDist * yDist);
580580

581-
if (W.settings.adjustSize) {
581+
if (W.settings.adjustSizes) {
582582

583583
//-- Linear Anti-collision Repulsion
584584
if (distance > 0) {
@@ -630,7 +630,7 @@
630630
xDist = NodeMatrix[np(n1, 'x')] - NodeMatrix[np(n2, 'x')];
631631
yDist = NodeMatrix[np(n1, 'y')] - NodeMatrix[np(n2, 'y')];
632632

633-
if (W.settings.adjustSize) {
633+
if (W.settings.adjustSizes) {
634634

635635
//-- Anticollision Linear Repulsion
636636
distance = Math.sqrt(xDist * xDist + yDist * yDist) -

0 commit comments

Comments
 (0)