summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--external/scripts/d3/d3.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/external/scripts/d3/d3.js b/external/scripts/d3/d3.js
index 82287776..9956a0dc 100644
--- a/external/scripts/d3/d3.js
+++ b/external/scripts/d3/d3.js
@@ -6108,7 +6108,7 @@
l = alpha * strengths[i] * ((l = Math.sqrt(l)) - distances[i]) / l;
x *= l;
y *= l;
- t.x -= x * (k = s.weight / (t.weight + s.weight));
+ t.x -= x * (k = (s.weight ? s.weight : 1) / ((t.weight ? t.weight : 1) + (s.weight ? s.weight : 1)));
t.y -= y * k;
s.x += x * (k = 1 - k);
s.y += y * k;