microboard-temp 0.13.19 → 0.13.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/browser.js +7 -4
- package/dist/cjs/index.js +7 -4
- package/dist/cjs/node.js +7 -4
- package/dist/esm/browser.js +7 -4
- package/dist/esm/index.js +7 -4
- package/dist/esm/node.js +7 -4
- package/package.json +1 -1
package/dist/cjs/browser.js
CHANGED
|
@@ -54705,10 +54705,13 @@ class ForceGraphEngine {
|
|
|
54705
54705
|
continue;
|
|
54706
54706
|
const dx = s2.cx - s1.cx;
|
|
54707
54707
|
const dy = s2.cy - s1.cy;
|
|
54708
|
-
const
|
|
54709
|
-
const
|
|
54710
|
-
const
|
|
54711
|
-
const
|
|
54708
|
+
const centerDist = Math.sqrt(dx * dx + dy * dy) + 0.001;
|
|
54709
|
+
const r1 = Math.max(s1.w, s1.h) * 0.5;
|
|
54710
|
+
const r2 = Math.max(s2.w, s2.h) * 0.5;
|
|
54711
|
+
const edgeDist = Math.max(centerDist - r1 - r2, 1);
|
|
54712
|
+
const repMag = conf.FG_REPULSION / (edgeDist * edgeDist + this.SOFTENING_SQ);
|
|
54713
|
+
const fx = dx / centerDist * repMag;
|
|
54714
|
+
const fy = dy / centerDist * repMag;
|
|
54712
54715
|
ax.set(s1.id, (ax.get(s1.id) ?? 0) - fx);
|
|
54713
54716
|
ay.set(s1.id, (ay.get(s1.id) ?? 0) - fy);
|
|
54714
54717
|
ax.set(s2.id, (ax.get(s2.id) ?? 0) + fx);
|
package/dist/cjs/index.js
CHANGED
|
@@ -54705,10 +54705,13 @@ class ForceGraphEngine {
|
|
|
54705
54705
|
continue;
|
|
54706
54706
|
const dx = s2.cx - s1.cx;
|
|
54707
54707
|
const dy = s2.cy - s1.cy;
|
|
54708
|
-
const
|
|
54709
|
-
const
|
|
54710
|
-
const
|
|
54711
|
-
const
|
|
54708
|
+
const centerDist = Math.sqrt(dx * dx + dy * dy) + 0.001;
|
|
54709
|
+
const r1 = Math.max(s1.w, s1.h) * 0.5;
|
|
54710
|
+
const r2 = Math.max(s2.w, s2.h) * 0.5;
|
|
54711
|
+
const edgeDist = Math.max(centerDist - r1 - r2, 1);
|
|
54712
|
+
const repMag = conf.FG_REPULSION / (edgeDist * edgeDist + this.SOFTENING_SQ);
|
|
54713
|
+
const fx = dx / centerDist * repMag;
|
|
54714
|
+
const fy = dy / centerDist * repMag;
|
|
54712
54715
|
ax.set(s1.id, (ax.get(s1.id) ?? 0) - fx);
|
|
54713
54716
|
ay.set(s1.id, (ay.get(s1.id) ?? 0) - fy);
|
|
54714
54717
|
ax.set(s2.id, (ax.get(s2.id) ?? 0) + fx);
|
package/dist/cjs/node.js
CHANGED
|
@@ -57178,10 +57178,13 @@ class ForceGraphEngine {
|
|
|
57178
57178
|
continue;
|
|
57179
57179
|
const dx = s2.cx - s1.cx;
|
|
57180
57180
|
const dy = s2.cy - s1.cy;
|
|
57181
|
-
const
|
|
57182
|
-
const
|
|
57183
|
-
const
|
|
57184
|
-
const
|
|
57181
|
+
const centerDist = Math.sqrt(dx * dx + dy * dy) + 0.001;
|
|
57182
|
+
const r1 = Math.max(s1.w, s1.h) * 0.5;
|
|
57183
|
+
const r2 = Math.max(s2.w, s2.h) * 0.5;
|
|
57184
|
+
const edgeDist = Math.max(centerDist - r1 - r2, 1);
|
|
57185
|
+
const repMag = conf.FG_REPULSION / (edgeDist * edgeDist + this.SOFTENING_SQ);
|
|
57186
|
+
const fx = dx / centerDist * repMag;
|
|
57187
|
+
const fy = dy / centerDist * repMag;
|
|
57185
57188
|
ax.set(s1.id, (ax.get(s1.id) ?? 0) - fx);
|
|
57186
57189
|
ay.set(s1.id, (ay.get(s1.id) ?? 0) - fy);
|
|
57187
57190
|
ax.set(s2.id, (ax.get(s2.id) ?? 0) + fx);
|
package/dist/esm/browser.js
CHANGED
|
@@ -54534,10 +54534,13 @@ class ForceGraphEngine {
|
|
|
54534
54534
|
continue;
|
|
54535
54535
|
const dx = s2.cx - s1.cx;
|
|
54536
54536
|
const dy = s2.cy - s1.cy;
|
|
54537
|
-
const
|
|
54538
|
-
const
|
|
54539
|
-
const
|
|
54540
|
-
const
|
|
54537
|
+
const centerDist = Math.sqrt(dx * dx + dy * dy) + 0.001;
|
|
54538
|
+
const r1 = Math.max(s1.w, s1.h) * 0.5;
|
|
54539
|
+
const r2 = Math.max(s2.w, s2.h) * 0.5;
|
|
54540
|
+
const edgeDist = Math.max(centerDist - r1 - r2, 1);
|
|
54541
|
+
const repMag = conf.FG_REPULSION / (edgeDist * edgeDist + this.SOFTENING_SQ);
|
|
54542
|
+
const fx = dx / centerDist * repMag;
|
|
54543
|
+
const fy = dy / centerDist * repMag;
|
|
54541
54544
|
ax.set(s1.id, (ax.get(s1.id) ?? 0) - fx);
|
|
54542
54545
|
ay.set(s1.id, (ay.get(s1.id) ?? 0) - fy);
|
|
54543
54546
|
ax.set(s2.id, (ax.get(s2.id) ?? 0) + fx);
|
package/dist/esm/index.js
CHANGED
|
@@ -54527,10 +54527,13 @@ class ForceGraphEngine {
|
|
|
54527
54527
|
continue;
|
|
54528
54528
|
const dx = s2.cx - s1.cx;
|
|
54529
54529
|
const dy = s2.cy - s1.cy;
|
|
54530
|
-
const
|
|
54531
|
-
const
|
|
54532
|
-
const
|
|
54533
|
-
const
|
|
54530
|
+
const centerDist = Math.sqrt(dx * dx + dy * dy) + 0.001;
|
|
54531
|
+
const r1 = Math.max(s1.w, s1.h) * 0.5;
|
|
54532
|
+
const r2 = Math.max(s2.w, s2.h) * 0.5;
|
|
54533
|
+
const edgeDist = Math.max(centerDist - r1 - r2, 1);
|
|
54534
|
+
const repMag = conf.FG_REPULSION / (edgeDist * edgeDist + this.SOFTENING_SQ);
|
|
54535
|
+
const fx = dx / centerDist * repMag;
|
|
54536
|
+
const fy = dy / centerDist * repMag;
|
|
54534
54537
|
ax.set(s1.id, (ax.get(s1.id) ?? 0) - fx);
|
|
54535
54538
|
ay.set(s1.id, (ay.get(s1.id) ?? 0) - fy);
|
|
54536
54539
|
ax.set(s2.id, (ax.get(s2.id) ?? 0) + fx);
|
package/dist/esm/node.js
CHANGED
|
@@ -56995,10 +56995,13 @@ class ForceGraphEngine {
|
|
|
56995
56995
|
continue;
|
|
56996
56996
|
const dx = s2.cx - s1.cx;
|
|
56997
56997
|
const dy = s2.cy - s1.cy;
|
|
56998
|
-
const
|
|
56999
|
-
const
|
|
57000
|
-
const
|
|
57001
|
-
const
|
|
56998
|
+
const centerDist = Math.sqrt(dx * dx + dy * dy) + 0.001;
|
|
56999
|
+
const r1 = Math.max(s1.w, s1.h) * 0.5;
|
|
57000
|
+
const r2 = Math.max(s2.w, s2.h) * 0.5;
|
|
57001
|
+
const edgeDist = Math.max(centerDist - r1 - r2, 1);
|
|
57002
|
+
const repMag = conf.FG_REPULSION / (edgeDist * edgeDist + this.SOFTENING_SQ);
|
|
57003
|
+
const fx = dx / centerDist * repMag;
|
|
57004
|
+
const fy = dy / centerDist * repMag;
|
|
57002
57005
|
ax.set(s1.id, (ax.get(s1.id) ?? 0) - fx);
|
|
57003
57006
|
ay.set(s1.id, (ay.get(s1.id) ?? 0) - fy);
|
|
57004
57007
|
ax.set(s2.id, (ax.get(s2.id) ?? 0) + fx);
|