microboard-temp 0.13.52 → 0.13.53
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 +4 -8
- package/dist/cjs/index.js +4 -8
- package/dist/cjs/node.js +4 -8
- package/dist/esm/browser.js +4 -8
- package/dist/esm/index.js +4 -8
- package/dist/esm/node.js +4 -8
- package/package.json +1 -1
package/dist/cjs/browser.js
CHANGED
|
@@ -3957,7 +3957,7 @@ var init_Settings = __esm(() => {
|
|
|
3957
3957
|
CONNECTOR_ITEM_OFFSET: 20,
|
|
3958
3958
|
FG_SPRING_K: 0.2,
|
|
3959
3959
|
FG_TARGET_GAP: 50,
|
|
3960
|
-
FG_REPULSION:
|
|
3960
|
+
FG_REPULSION: 100,
|
|
3961
3961
|
FG_MIN_DIST_SQ: 100,
|
|
3962
3962
|
FG_DAMPING: 0.6,
|
|
3963
3963
|
FG_SLEEP_THRESHOLD: 0.5,
|
|
@@ -60911,7 +60911,7 @@ class ForceGraphEngine {
|
|
|
60911
60911
|
const maxDimA = Math.max(s1.w, s1.h);
|
|
60912
60912
|
const maxDimB = Math.max(s2.w, s2.h);
|
|
60913
60913
|
const targetDist = (maxDimA + maxDimB) * 0.5 + Math.max(maxDimA, maxDimB);
|
|
60914
|
-
const force = (dist - targetDist)
|
|
60914
|
+
const force = (dist - targetDist) * conf.FG_SPRING_K;
|
|
60915
60915
|
const fx = dx / dist * force;
|
|
60916
60916
|
const fy = dy / dist * force;
|
|
60917
60917
|
ax.set(s1.id, (ax.get(s1.id) ?? 0) + fx);
|
|
@@ -60927,12 +60927,8 @@ class ForceGraphEngine {
|
|
|
60927
60927
|
continue;
|
|
60928
60928
|
const dx = s2.cx - s1.cx;
|
|
60929
60929
|
const dy = s2.cy - s1.cy;
|
|
60930
|
-
const
|
|
60931
|
-
const
|
|
60932
|
-
const refDist = (refDimA + refDimB) * 0.5 + Math.max(refDimA, refDimB);
|
|
60933
|
-
const minDistSq = refDist * refDist / 100;
|
|
60934
|
-
const distSq = Math.max(dx * dx + dy * dy, minDistSq);
|
|
60935
|
-
const force = conf.FG_REPULSION * refDist / distSq;
|
|
60930
|
+
const distSq = Math.max(dx * dx + dy * dy, conf.FG_MIN_DIST_SQ);
|
|
60931
|
+
const force = conf.FG_REPULSION / distSq;
|
|
60936
60932
|
ax.set(s1.id, (ax.get(s1.id) ?? 0) - dx * force);
|
|
60937
60933
|
ay.set(s1.id, (ay.get(s1.id) ?? 0) - dy * force);
|
|
60938
60934
|
ax.set(s2.id, (ax.get(s2.id) ?? 0) + dx * force);
|
package/dist/cjs/index.js
CHANGED
|
@@ -3957,7 +3957,7 @@ var init_Settings = __esm(() => {
|
|
|
3957
3957
|
CONNECTOR_ITEM_OFFSET: 20,
|
|
3958
3958
|
FG_SPRING_K: 0.2,
|
|
3959
3959
|
FG_TARGET_GAP: 50,
|
|
3960
|
-
FG_REPULSION:
|
|
3960
|
+
FG_REPULSION: 100,
|
|
3961
3961
|
FG_MIN_DIST_SQ: 100,
|
|
3962
3962
|
FG_DAMPING: 0.6,
|
|
3963
3963
|
FG_SLEEP_THRESHOLD: 0.5,
|
|
@@ -60911,7 +60911,7 @@ class ForceGraphEngine {
|
|
|
60911
60911
|
const maxDimA = Math.max(s1.w, s1.h);
|
|
60912
60912
|
const maxDimB = Math.max(s2.w, s2.h);
|
|
60913
60913
|
const targetDist = (maxDimA + maxDimB) * 0.5 + Math.max(maxDimA, maxDimB);
|
|
60914
|
-
const force = (dist - targetDist)
|
|
60914
|
+
const force = (dist - targetDist) * conf.FG_SPRING_K;
|
|
60915
60915
|
const fx = dx / dist * force;
|
|
60916
60916
|
const fy = dy / dist * force;
|
|
60917
60917
|
ax.set(s1.id, (ax.get(s1.id) ?? 0) + fx);
|
|
@@ -60927,12 +60927,8 @@ class ForceGraphEngine {
|
|
|
60927
60927
|
continue;
|
|
60928
60928
|
const dx = s2.cx - s1.cx;
|
|
60929
60929
|
const dy = s2.cy - s1.cy;
|
|
60930
|
-
const
|
|
60931
|
-
const
|
|
60932
|
-
const refDist = (refDimA + refDimB) * 0.5 + Math.max(refDimA, refDimB);
|
|
60933
|
-
const minDistSq = refDist * refDist / 100;
|
|
60934
|
-
const distSq = Math.max(dx * dx + dy * dy, minDistSq);
|
|
60935
|
-
const force = conf.FG_REPULSION * refDist / distSq;
|
|
60930
|
+
const distSq = Math.max(dx * dx + dy * dy, conf.FG_MIN_DIST_SQ);
|
|
60931
|
+
const force = conf.FG_REPULSION / distSq;
|
|
60936
60932
|
ax.set(s1.id, (ax.get(s1.id) ?? 0) - dx * force);
|
|
60937
60933
|
ay.set(s1.id, (ay.get(s1.id) ?? 0) - dy * force);
|
|
60938
60934
|
ax.set(s2.id, (ax.get(s2.id) ?? 0) + dx * force);
|
package/dist/cjs/node.js
CHANGED
|
@@ -3957,7 +3957,7 @@ var init_Settings = __esm(() => {
|
|
|
3957
3957
|
CONNECTOR_ITEM_OFFSET: 20,
|
|
3958
3958
|
FG_SPRING_K: 0.2,
|
|
3959
3959
|
FG_TARGET_GAP: 50,
|
|
3960
|
-
FG_REPULSION:
|
|
3960
|
+
FG_REPULSION: 100,
|
|
3961
3961
|
FG_MIN_DIST_SQ: 100,
|
|
3962
3962
|
FG_DAMPING: 0.6,
|
|
3963
3963
|
FG_SLEEP_THRESHOLD: 0.5,
|
|
@@ -63386,7 +63386,7 @@ class ForceGraphEngine {
|
|
|
63386
63386
|
const maxDimA = Math.max(s1.w, s1.h);
|
|
63387
63387
|
const maxDimB = Math.max(s2.w, s2.h);
|
|
63388
63388
|
const targetDist = (maxDimA + maxDimB) * 0.5 + Math.max(maxDimA, maxDimB);
|
|
63389
|
-
const force = (dist - targetDist)
|
|
63389
|
+
const force = (dist - targetDist) * conf.FG_SPRING_K;
|
|
63390
63390
|
const fx = dx / dist * force;
|
|
63391
63391
|
const fy = dy / dist * force;
|
|
63392
63392
|
ax.set(s1.id, (ax.get(s1.id) ?? 0) + fx);
|
|
@@ -63402,12 +63402,8 @@ class ForceGraphEngine {
|
|
|
63402
63402
|
continue;
|
|
63403
63403
|
const dx = s2.cx - s1.cx;
|
|
63404
63404
|
const dy = s2.cy - s1.cy;
|
|
63405
|
-
const
|
|
63406
|
-
const
|
|
63407
|
-
const refDist = (refDimA + refDimB) * 0.5 + Math.max(refDimA, refDimB);
|
|
63408
|
-
const minDistSq = refDist * refDist / 100;
|
|
63409
|
-
const distSq = Math.max(dx * dx + dy * dy, minDistSq);
|
|
63410
|
-
const force = conf.FG_REPULSION * refDist / distSq;
|
|
63405
|
+
const distSq = Math.max(dx * dx + dy * dy, conf.FG_MIN_DIST_SQ);
|
|
63406
|
+
const force = conf.FG_REPULSION / distSq;
|
|
63411
63407
|
ax.set(s1.id, (ax.get(s1.id) ?? 0) - dx * force);
|
|
63412
63408
|
ay.set(s1.id, (ay.get(s1.id) ?? 0) - dy * force);
|
|
63413
63409
|
ax.set(s2.id, (ax.get(s2.id) ?? 0) + dx * force);
|
package/dist/esm/browser.js
CHANGED
|
@@ -3964,7 +3964,7 @@ var init_Settings = __esm(() => {
|
|
|
3964
3964
|
CONNECTOR_ITEM_OFFSET: 20,
|
|
3965
3965
|
FG_SPRING_K: 0.2,
|
|
3966
3966
|
FG_TARGET_GAP: 50,
|
|
3967
|
-
FG_REPULSION:
|
|
3967
|
+
FG_REPULSION: 100,
|
|
3968
3968
|
FG_MIN_DIST_SQ: 100,
|
|
3969
3969
|
FG_DAMPING: 0.6,
|
|
3970
3970
|
FG_SLEEP_THRESHOLD: 0.5,
|
|
@@ -60654,7 +60654,7 @@ class ForceGraphEngine {
|
|
|
60654
60654
|
const maxDimA = Math.max(s1.w, s1.h);
|
|
60655
60655
|
const maxDimB = Math.max(s2.w, s2.h);
|
|
60656
60656
|
const targetDist = (maxDimA + maxDimB) * 0.5 + Math.max(maxDimA, maxDimB);
|
|
60657
|
-
const force = (dist - targetDist)
|
|
60657
|
+
const force = (dist - targetDist) * conf.FG_SPRING_K;
|
|
60658
60658
|
const fx = dx / dist * force;
|
|
60659
60659
|
const fy = dy / dist * force;
|
|
60660
60660
|
ax.set(s1.id, (ax.get(s1.id) ?? 0) + fx);
|
|
@@ -60670,12 +60670,8 @@ class ForceGraphEngine {
|
|
|
60670
60670
|
continue;
|
|
60671
60671
|
const dx = s2.cx - s1.cx;
|
|
60672
60672
|
const dy = s2.cy - s1.cy;
|
|
60673
|
-
const
|
|
60674
|
-
const
|
|
60675
|
-
const refDist = (refDimA + refDimB) * 0.5 + Math.max(refDimA, refDimB);
|
|
60676
|
-
const minDistSq = refDist * refDist / 100;
|
|
60677
|
-
const distSq = Math.max(dx * dx + dy * dy, minDistSq);
|
|
60678
|
-
const force = conf.FG_REPULSION * refDist / distSq;
|
|
60673
|
+
const distSq = Math.max(dx * dx + dy * dy, conf.FG_MIN_DIST_SQ);
|
|
60674
|
+
const force = conf.FG_REPULSION / distSq;
|
|
60679
60675
|
ax.set(s1.id, (ax.get(s1.id) ?? 0) - dx * force);
|
|
60680
60676
|
ay.set(s1.id, (ay.get(s1.id) ?? 0) - dy * force);
|
|
60681
60677
|
ax.set(s2.id, (ax.get(s2.id) ?? 0) + dx * force);
|
package/dist/esm/index.js
CHANGED
|
@@ -3957,7 +3957,7 @@ var init_Settings = __esm(() => {
|
|
|
3957
3957
|
CONNECTOR_ITEM_OFFSET: 20,
|
|
3958
3958
|
FG_SPRING_K: 0.2,
|
|
3959
3959
|
FG_TARGET_GAP: 50,
|
|
3960
|
-
FG_REPULSION:
|
|
3960
|
+
FG_REPULSION: 100,
|
|
3961
3961
|
FG_MIN_DIST_SQ: 100,
|
|
3962
3962
|
FG_DAMPING: 0.6,
|
|
3963
3963
|
FG_SLEEP_THRESHOLD: 0.5,
|
|
@@ -60647,7 +60647,7 @@ class ForceGraphEngine {
|
|
|
60647
60647
|
const maxDimA = Math.max(s1.w, s1.h);
|
|
60648
60648
|
const maxDimB = Math.max(s2.w, s2.h);
|
|
60649
60649
|
const targetDist = (maxDimA + maxDimB) * 0.5 + Math.max(maxDimA, maxDimB);
|
|
60650
|
-
const force = (dist - targetDist)
|
|
60650
|
+
const force = (dist - targetDist) * conf.FG_SPRING_K;
|
|
60651
60651
|
const fx = dx / dist * force;
|
|
60652
60652
|
const fy = dy / dist * force;
|
|
60653
60653
|
ax.set(s1.id, (ax.get(s1.id) ?? 0) + fx);
|
|
@@ -60663,12 +60663,8 @@ class ForceGraphEngine {
|
|
|
60663
60663
|
continue;
|
|
60664
60664
|
const dx = s2.cx - s1.cx;
|
|
60665
60665
|
const dy = s2.cy - s1.cy;
|
|
60666
|
-
const
|
|
60667
|
-
const
|
|
60668
|
-
const refDist = (refDimA + refDimB) * 0.5 + Math.max(refDimA, refDimB);
|
|
60669
|
-
const minDistSq = refDist * refDist / 100;
|
|
60670
|
-
const distSq = Math.max(dx * dx + dy * dy, minDistSq);
|
|
60671
|
-
const force = conf.FG_REPULSION * refDist / distSq;
|
|
60666
|
+
const distSq = Math.max(dx * dx + dy * dy, conf.FG_MIN_DIST_SQ);
|
|
60667
|
+
const force = conf.FG_REPULSION / distSq;
|
|
60672
60668
|
ax.set(s1.id, (ax.get(s1.id) ?? 0) - dx * force);
|
|
60673
60669
|
ay.set(s1.id, (ay.get(s1.id) ?? 0) - dy * force);
|
|
60674
60670
|
ax.set(s2.id, (ax.get(s2.id) ?? 0) + dx * force);
|
package/dist/esm/node.js
CHANGED
|
@@ -3959,7 +3959,7 @@ var init_Settings = __esm(() => {
|
|
|
3959
3959
|
CONNECTOR_ITEM_OFFSET: 20,
|
|
3960
3960
|
FG_SPRING_K: 0.2,
|
|
3961
3961
|
FG_TARGET_GAP: 50,
|
|
3962
|
-
FG_REPULSION:
|
|
3962
|
+
FG_REPULSION: 100,
|
|
3963
3963
|
FG_MIN_DIST_SQ: 100,
|
|
3964
3964
|
FG_DAMPING: 0.6,
|
|
3965
3965
|
FG_SLEEP_THRESHOLD: 0.5,
|
|
@@ -63111,7 +63111,7 @@ class ForceGraphEngine {
|
|
|
63111
63111
|
const maxDimA = Math.max(s1.w, s1.h);
|
|
63112
63112
|
const maxDimB = Math.max(s2.w, s2.h);
|
|
63113
63113
|
const targetDist = (maxDimA + maxDimB) * 0.5 + Math.max(maxDimA, maxDimB);
|
|
63114
|
-
const force = (dist - targetDist)
|
|
63114
|
+
const force = (dist - targetDist) * conf.FG_SPRING_K;
|
|
63115
63115
|
const fx = dx / dist * force;
|
|
63116
63116
|
const fy = dy / dist * force;
|
|
63117
63117
|
ax.set(s1.id, (ax.get(s1.id) ?? 0) + fx);
|
|
@@ -63127,12 +63127,8 @@ class ForceGraphEngine {
|
|
|
63127
63127
|
continue;
|
|
63128
63128
|
const dx = s2.cx - s1.cx;
|
|
63129
63129
|
const dy = s2.cy - s1.cy;
|
|
63130
|
-
const
|
|
63131
|
-
const
|
|
63132
|
-
const refDist = (refDimA + refDimB) * 0.5 + Math.max(refDimA, refDimB);
|
|
63133
|
-
const minDistSq = refDist * refDist / 100;
|
|
63134
|
-
const distSq = Math.max(dx * dx + dy * dy, minDistSq);
|
|
63135
|
-
const force = conf.FG_REPULSION * refDist / distSq;
|
|
63130
|
+
const distSq = Math.max(dx * dx + dy * dy, conf.FG_MIN_DIST_SQ);
|
|
63131
|
+
const force = conf.FG_REPULSION / distSq;
|
|
63136
63132
|
ax.set(s1.id, (ax.get(s1.id) ?? 0) - dx * force);
|
|
63137
63133
|
ay.set(s1.id, (ay.get(s1.id) ?? 0) - dy * force);
|
|
63138
63134
|
ax.set(s2.id, (ax.get(s2.id) ?? 0) + dx * force);
|