Permalink
Browse files

fixed a bug on ForceAtlas2

  • Loading branch information...
1 parent 7e44d99 commit 3c8a1e63291e3de7d201693d11f198ab8ea84712 @rangeonnicolas rangeonnicolas committed Feb 12, 2016
Showing with 4 additions and 4 deletions.
  1. +4 −4 plugins/sigma.layout.forceAtlas2/worker.js
@@ -492,7 +492,7 @@
// 2) Repulsion
//--------------
- // NOTES: adjustSize = antiCollision & scalingRatio = coefficient
+ // NOTES: adjustSizes = antiCollision & scalingRatio = coefficient
if (W.settings.barnesHutOptimize) {
coefficient = W.settings.scalingRatio;
@@ -522,7 +522,7 @@
xDist = NodeMatrix[np(n, 'x')] - RegionMatrix[rp(r, 'massCenterX')];
yDist = NodeMatrix[np(n, 'y')] - RegionMatrix[rp(r, 'massCenterY')];
- if (W.settings.adjustSize) {
+ if (W.settings.adjustSizes) {
//-- Linear Anti-collision Repulsion
if (distance > 0) {
@@ -578,7 +578,7 @@
distance = Math.sqrt(xDist * xDist + yDist * yDist);
- if (W.settings.adjustSize) {
+ if (W.settings.adjustSizes) {
//-- Linear Anti-collision Repulsion
if (distance > 0) {
@@ -630,7 +630,7 @@
xDist = NodeMatrix[np(n1, 'x')] - NodeMatrix[np(n2, 'x')];
yDist = NodeMatrix[np(n1, 'y')] - NodeMatrix[np(n2, 'y')];
- if (W.settings.adjustSize) {
+ if (W.settings.adjustSizes) {
//-- Anticollision Linear Repulsion
distance = Math.sqrt(xDist * xDist + yDist * yDist) -

0 comments on commit 3c8a1e6

Please sign in to comment.