@almadar/ui 5.121.1 → 5.121.2
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/avl/index.cjs +2 -2
- package/dist/avl/index.js +2 -2
- package/dist/components/index.cjs +2 -2
- package/dist/components/index.js +2 -2
- package/dist/providers/index.cjs +2 -2
- package/dist/providers/index.js +2 -2
- package/dist/runtime/index.cjs +2 -2
- package/dist/runtime/index.js +2 -2
- package/package.json +1 -1
package/dist/avl/index.cjs
CHANGED
|
@@ -37246,7 +37246,7 @@ function measureLabelWidth(text, fontFamily = "system-ui") {
|
|
|
37246
37246
|
return labelMeasureCtx.measureText(text).width + 4;
|
|
37247
37247
|
}
|
|
37248
37248
|
function getGroupColor(group, groups) {
|
|
37249
|
-
if (!group) return GROUP_COLORS2[0];
|
|
37249
|
+
if (!group) return groups.length > 0 ? "var(--color-muted-foreground)" : GROUP_COLORS2[0];
|
|
37250
37250
|
const idx = groups.indexOf(group);
|
|
37251
37251
|
return GROUP_COLORS2[idx % GROUP_COLORS2.length];
|
|
37252
37252
|
}
|
|
@@ -37485,7 +37485,7 @@ var init_GraphCanvas = __esm({
|
|
|
37485
37485
|
const edgeLinks = propEdges.filter((e) => present.has(e.source) && present.has(e.target)).map((e) => ({ source: e.source, target: e.target, weight: clamp01(e.weight ?? 1) }));
|
|
37486
37486
|
const simLinks = activeSimilarity.filter((p) => present.has(p.source) && present.has(p.target)).map((p) => ({ source: p.source, target: p.target, weight: clamp01(p.weight) }));
|
|
37487
37487
|
const collideRadius = (n) => Math.max(n.size || 8, (n.labelW ?? 0) / 2) + nodeSpacing / 2;
|
|
37488
|
-
const simulation = d3Force.forceSimulation(simNodes).force("edge", d3Force.forceLink(edgeLinks).id((d) => d.id).distance((l) => linkDistance * (0.35 + (1 - l.weight) * 0.3)).strength(0.9)).force("similarity", d3Force.forceLink(simLinks).id((d) => d.id).distance((l) => linkDistance * (1.35 - 0.55 * l.weight)).strength(0.03)).force("charge", d3Force.forceManyBody().strength(-repulsion * 0.5)).force("collide", d3Force.forceCollide().radius(collideRadius).strength(0.9)).force("x", d3Force.forceX((n) => groupTarget.get(n.group ?? "")?.x ?? w / 2).strength(multiCluster ? 0.
|
|
37488
|
+
const simulation = d3Force.forceSimulation(simNodes).force("edge", d3Force.forceLink(edgeLinks).id((d) => d.id).distance((l) => linkDistance * (0.35 + (1 - l.weight) * 0.3)).strength(0.9)).force("similarity", d3Force.forceLink(simLinks).id((d) => d.id).distance((l) => linkDistance * (1.35 - 0.55 * l.weight)).strength(0.03)).force("charge", d3Force.forceManyBody().strength(-repulsion * 0.5)).force("collide", d3Force.forceCollide().radius(collideRadius).strength(0.9)).force("x", d3Force.forceX((n) => groupTarget.get(n.group ?? "")?.x ?? w / 2).strength((n) => multiCluster && n.group ? 0.14 : 0.02)).force("y", d3Force.forceY((n) => groupTarget.get(n.group ?? "")?.y ?? h / 2).strength((n) => multiCluster && n.group ? 0.14 : 0.02)).stop();
|
|
37489
37489
|
for (let i = 0; i < 300; i++) simulation.tick();
|
|
37490
37490
|
const pad = nodeSpacing / 2;
|
|
37491
37491
|
const rectsOf = (n) => {
|
package/dist/avl/index.js
CHANGED
|
@@ -37200,7 +37200,7 @@ function measureLabelWidth(text, fontFamily = "system-ui") {
|
|
|
37200
37200
|
return labelMeasureCtx.measureText(text).width + 4;
|
|
37201
37201
|
}
|
|
37202
37202
|
function getGroupColor(group, groups) {
|
|
37203
|
-
if (!group) return GROUP_COLORS2[0];
|
|
37203
|
+
if (!group) return groups.length > 0 ? "var(--color-muted-foreground)" : GROUP_COLORS2[0];
|
|
37204
37204
|
const idx = groups.indexOf(group);
|
|
37205
37205
|
return GROUP_COLORS2[idx % GROUP_COLORS2.length];
|
|
37206
37206
|
}
|
|
@@ -37439,7 +37439,7 @@ var init_GraphCanvas = __esm({
|
|
|
37439
37439
|
const edgeLinks = propEdges.filter((e) => present.has(e.source) && present.has(e.target)).map((e) => ({ source: e.source, target: e.target, weight: clamp01(e.weight ?? 1) }));
|
|
37440
37440
|
const simLinks = activeSimilarity.filter((p) => present.has(p.source) && present.has(p.target)).map((p) => ({ source: p.source, target: p.target, weight: clamp01(p.weight) }));
|
|
37441
37441
|
const collideRadius = (n) => Math.max(n.size || 8, (n.labelW ?? 0) / 2) + nodeSpacing / 2;
|
|
37442
|
-
const simulation = forceSimulation(simNodes).force("edge", forceLink(edgeLinks).id((d) => d.id).distance((l) => linkDistance * (0.35 + (1 - l.weight) * 0.3)).strength(0.9)).force("similarity", forceLink(simLinks).id((d) => d.id).distance((l) => linkDistance * (1.35 - 0.55 * l.weight)).strength(0.03)).force("charge", forceManyBody().strength(-repulsion * 0.5)).force("collide", forceCollide().radius(collideRadius).strength(0.9)).force("x", forceX((n) => groupTarget.get(n.group ?? "")?.x ?? w / 2).strength(multiCluster ? 0.
|
|
37442
|
+
const simulation = forceSimulation(simNodes).force("edge", forceLink(edgeLinks).id((d) => d.id).distance((l) => linkDistance * (0.35 + (1 - l.weight) * 0.3)).strength(0.9)).force("similarity", forceLink(simLinks).id((d) => d.id).distance((l) => linkDistance * (1.35 - 0.55 * l.weight)).strength(0.03)).force("charge", forceManyBody().strength(-repulsion * 0.5)).force("collide", forceCollide().radius(collideRadius).strength(0.9)).force("x", forceX((n) => groupTarget.get(n.group ?? "")?.x ?? w / 2).strength((n) => multiCluster && n.group ? 0.14 : 0.02)).force("y", forceY((n) => groupTarget.get(n.group ?? "")?.y ?? h / 2).strength((n) => multiCluster && n.group ? 0.14 : 0.02)).stop();
|
|
37443
37443
|
for (let i = 0; i < 300; i++) simulation.tick();
|
|
37444
37444
|
const pad = nodeSpacing / 2;
|
|
37445
37445
|
const rectsOf = (n) => {
|
|
@@ -36635,7 +36635,7 @@ function measureLabelWidth(text, fontFamily = "system-ui") {
|
|
|
36635
36635
|
return labelMeasureCtx.measureText(text).width + 4;
|
|
36636
36636
|
}
|
|
36637
36637
|
function getGroupColor(group, groups) {
|
|
36638
|
-
if (!group) return GROUP_COLORS2[0];
|
|
36638
|
+
if (!group) return groups.length > 0 ? "var(--color-muted-foreground)" : GROUP_COLORS2[0];
|
|
36639
36639
|
const idx = groups.indexOf(group);
|
|
36640
36640
|
return GROUP_COLORS2[idx % GROUP_COLORS2.length];
|
|
36641
36641
|
}
|
|
@@ -36874,7 +36874,7 @@ var init_GraphCanvas = __esm({
|
|
|
36874
36874
|
const edgeLinks = propEdges.filter((e) => present.has(e.source) && present.has(e.target)).map((e) => ({ source: e.source, target: e.target, weight: clamp01(e.weight ?? 1) }));
|
|
36875
36875
|
const simLinks = activeSimilarity.filter((p) => present.has(p.source) && present.has(p.target)).map((p) => ({ source: p.source, target: p.target, weight: clamp01(p.weight) }));
|
|
36876
36876
|
const collideRadius = (n) => Math.max(n.size || 8, (n.labelW ?? 0) / 2) + nodeSpacing / 2;
|
|
36877
|
-
const simulation = d3Force.forceSimulation(simNodes).force("edge", d3Force.forceLink(edgeLinks).id((d) => d.id).distance((l) => linkDistance * (0.35 + (1 - l.weight) * 0.3)).strength(0.9)).force("similarity", d3Force.forceLink(simLinks).id((d) => d.id).distance((l) => linkDistance * (1.35 - 0.55 * l.weight)).strength(0.03)).force("charge", d3Force.forceManyBody().strength(-repulsion * 0.5)).force("collide", d3Force.forceCollide().radius(collideRadius).strength(0.9)).force("x", d3Force.forceX((n) => groupTarget.get(n.group ?? "")?.x ?? w / 2).strength(multiCluster ? 0.
|
|
36877
|
+
const simulation = d3Force.forceSimulation(simNodes).force("edge", d3Force.forceLink(edgeLinks).id((d) => d.id).distance((l) => linkDistance * (0.35 + (1 - l.weight) * 0.3)).strength(0.9)).force("similarity", d3Force.forceLink(simLinks).id((d) => d.id).distance((l) => linkDistance * (1.35 - 0.55 * l.weight)).strength(0.03)).force("charge", d3Force.forceManyBody().strength(-repulsion * 0.5)).force("collide", d3Force.forceCollide().radius(collideRadius).strength(0.9)).force("x", d3Force.forceX((n) => groupTarget.get(n.group ?? "")?.x ?? w / 2).strength((n) => multiCluster && n.group ? 0.14 : 0.02)).force("y", d3Force.forceY((n) => groupTarget.get(n.group ?? "")?.y ?? h / 2).strength((n) => multiCluster && n.group ? 0.14 : 0.02)).stop();
|
|
36878
36878
|
for (let i = 0; i < 300; i++) simulation.tick();
|
|
36879
36879
|
const pad = nodeSpacing / 2;
|
|
36880
36880
|
const rectsOf = (n) => {
|
package/dist/components/index.js
CHANGED
|
@@ -36590,7 +36590,7 @@ function measureLabelWidth(text, fontFamily = "system-ui") {
|
|
|
36590
36590
|
return labelMeasureCtx.measureText(text).width + 4;
|
|
36591
36591
|
}
|
|
36592
36592
|
function getGroupColor(group, groups) {
|
|
36593
|
-
if (!group) return GROUP_COLORS2[0];
|
|
36593
|
+
if (!group) return groups.length > 0 ? "var(--color-muted-foreground)" : GROUP_COLORS2[0];
|
|
36594
36594
|
const idx = groups.indexOf(group);
|
|
36595
36595
|
return GROUP_COLORS2[idx % GROUP_COLORS2.length];
|
|
36596
36596
|
}
|
|
@@ -36829,7 +36829,7 @@ var init_GraphCanvas = __esm({
|
|
|
36829
36829
|
const edgeLinks = propEdges.filter((e) => present.has(e.source) && present.has(e.target)).map((e) => ({ source: e.source, target: e.target, weight: clamp01(e.weight ?? 1) }));
|
|
36830
36830
|
const simLinks = activeSimilarity.filter((p) => present.has(p.source) && present.has(p.target)).map((p) => ({ source: p.source, target: p.target, weight: clamp01(p.weight) }));
|
|
36831
36831
|
const collideRadius = (n) => Math.max(n.size || 8, (n.labelW ?? 0) / 2) + nodeSpacing / 2;
|
|
36832
|
-
const simulation = forceSimulation(simNodes).force("edge", forceLink(edgeLinks).id((d) => d.id).distance((l) => linkDistance * (0.35 + (1 - l.weight) * 0.3)).strength(0.9)).force("similarity", forceLink(simLinks).id((d) => d.id).distance((l) => linkDistance * (1.35 - 0.55 * l.weight)).strength(0.03)).force("charge", forceManyBody().strength(-repulsion * 0.5)).force("collide", forceCollide().radius(collideRadius).strength(0.9)).force("x", forceX((n) => groupTarget.get(n.group ?? "")?.x ?? w / 2).strength(multiCluster ? 0.
|
|
36832
|
+
const simulation = forceSimulation(simNodes).force("edge", forceLink(edgeLinks).id((d) => d.id).distance((l) => linkDistance * (0.35 + (1 - l.weight) * 0.3)).strength(0.9)).force("similarity", forceLink(simLinks).id((d) => d.id).distance((l) => linkDistance * (1.35 - 0.55 * l.weight)).strength(0.03)).force("charge", forceManyBody().strength(-repulsion * 0.5)).force("collide", forceCollide().radius(collideRadius).strength(0.9)).force("x", forceX((n) => groupTarget.get(n.group ?? "")?.x ?? w / 2).strength((n) => multiCluster && n.group ? 0.14 : 0.02)).force("y", forceY((n) => groupTarget.get(n.group ?? "")?.y ?? h / 2).strength((n) => multiCluster && n.group ? 0.14 : 0.02)).stop();
|
|
36833
36833
|
for (let i = 0; i < 300; i++) simulation.tick();
|
|
36834
36834
|
const pad = nodeSpacing / 2;
|
|
36835
36835
|
const rectsOf = (n) => {
|
package/dist/providers/index.cjs
CHANGED
|
@@ -35376,7 +35376,7 @@ function measureLabelWidth(text, fontFamily = "system-ui") {
|
|
|
35376
35376
|
return labelMeasureCtx.measureText(text).width + 4;
|
|
35377
35377
|
}
|
|
35378
35378
|
function getGroupColor(group, groups) {
|
|
35379
|
-
if (!group) return GROUP_COLORS2[0];
|
|
35379
|
+
if (!group) return groups.length > 0 ? "var(--color-muted-foreground)" : GROUP_COLORS2[0];
|
|
35380
35380
|
const idx = groups.indexOf(group);
|
|
35381
35381
|
return GROUP_COLORS2[idx % GROUP_COLORS2.length];
|
|
35382
35382
|
}
|
|
@@ -35615,7 +35615,7 @@ var init_GraphCanvas = __esm({
|
|
|
35615
35615
|
const edgeLinks = propEdges.filter((e) => present.has(e.source) && present.has(e.target)).map((e) => ({ source: e.source, target: e.target, weight: clamp01(e.weight ?? 1) }));
|
|
35616
35616
|
const simLinks = activeSimilarity.filter((p) => present.has(p.source) && present.has(p.target)).map((p) => ({ source: p.source, target: p.target, weight: clamp01(p.weight) }));
|
|
35617
35617
|
const collideRadius = (n) => Math.max(n.size || 8, (n.labelW ?? 0) / 2) + nodeSpacing / 2;
|
|
35618
|
-
const simulation = d3Force.forceSimulation(simNodes).force("edge", d3Force.forceLink(edgeLinks).id((d) => d.id).distance((l) => linkDistance * (0.35 + (1 - l.weight) * 0.3)).strength(0.9)).force("similarity", d3Force.forceLink(simLinks).id((d) => d.id).distance((l) => linkDistance * (1.35 - 0.55 * l.weight)).strength(0.03)).force("charge", d3Force.forceManyBody().strength(-repulsion * 0.5)).force("collide", d3Force.forceCollide().radius(collideRadius).strength(0.9)).force("x", d3Force.forceX((n) => groupTarget.get(n.group ?? "")?.x ?? w / 2).strength(multiCluster ? 0.
|
|
35618
|
+
const simulation = d3Force.forceSimulation(simNodes).force("edge", d3Force.forceLink(edgeLinks).id((d) => d.id).distance((l) => linkDistance * (0.35 + (1 - l.weight) * 0.3)).strength(0.9)).force("similarity", d3Force.forceLink(simLinks).id((d) => d.id).distance((l) => linkDistance * (1.35 - 0.55 * l.weight)).strength(0.03)).force("charge", d3Force.forceManyBody().strength(-repulsion * 0.5)).force("collide", d3Force.forceCollide().radius(collideRadius).strength(0.9)).force("x", d3Force.forceX((n) => groupTarget.get(n.group ?? "")?.x ?? w / 2).strength((n) => multiCluster && n.group ? 0.14 : 0.02)).force("y", d3Force.forceY((n) => groupTarget.get(n.group ?? "")?.y ?? h / 2).strength((n) => multiCluster && n.group ? 0.14 : 0.02)).stop();
|
|
35619
35619
|
for (let i = 0; i < 300; i++) simulation.tick();
|
|
35620
35620
|
const pad = nodeSpacing / 2;
|
|
35621
35621
|
const rectsOf = (n) => {
|
package/dist/providers/index.js
CHANGED
|
@@ -35331,7 +35331,7 @@ function measureLabelWidth(text, fontFamily = "system-ui") {
|
|
|
35331
35331
|
return labelMeasureCtx.measureText(text).width + 4;
|
|
35332
35332
|
}
|
|
35333
35333
|
function getGroupColor(group, groups) {
|
|
35334
|
-
if (!group) return GROUP_COLORS2[0];
|
|
35334
|
+
if (!group) return groups.length > 0 ? "var(--color-muted-foreground)" : GROUP_COLORS2[0];
|
|
35335
35335
|
const idx = groups.indexOf(group);
|
|
35336
35336
|
return GROUP_COLORS2[idx % GROUP_COLORS2.length];
|
|
35337
35337
|
}
|
|
@@ -35570,7 +35570,7 @@ var init_GraphCanvas = __esm({
|
|
|
35570
35570
|
const edgeLinks = propEdges.filter((e) => present.has(e.source) && present.has(e.target)).map((e) => ({ source: e.source, target: e.target, weight: clamp01(e.weight ?? 1) }));
|
|
35571
35571
|
const simLinks = activeSimilarity.filter((p) => present.has(p.source) && present.has(p.target)).map((p) => ({ source: p.source, target: p.target, weight: clamp01(p.weight) }));
|
|
35572
35572
|
const collideRadius = (n) => Math.max(n.size || 8, (n.labelW ?? 0) / 2) + nodeSpacing / 2;
|
|
35573
|
-
const simulation = forceSimulation(simNodes).force("edge", forceLink(edgeLinks).id((d) => d.id).distance((l) => linkDistance * (0.35 + (1 - l.weight) * 0.3)).strength(0.9)).force("similarity", forceLink(simLinks).id((d) => d.id).distance((l) => linkDistance * (1.35 - 0.55 * l.weight)).strength(0.03)).force("charge", forceManyBody().strength(-repulsion * 0.5)).force("collide", forceCollide().radius(collideRadius).strength(0.9)).force("x", forceX((n) => groupTarget.get(n.group ?? "")?.x ?? w / 2).strength(multiCluster ? 0.
|
|
35573
|
+
const simulation = forceSimulation(simNodes).force("edge", forceLink(edgeLinks).id((d) => d.id).distance((l) => linkDistance * (0.35 + (1 - l.weight) * 0.3)).strength(0.9)).force("similarity", forceLink(simLinks).id((d) => d.id).distance((l) => linkDistance * (1.35 - 0.55 * l.weight)).strength(0.03)).force("charge", forceManyBody().strength(-repulsion * 0.5)).force("collide", forceCollide().radius(collideRadius).strength(0.9)).force("x", forceX((n) => groupTarget.get(n.group ?? "")?.x ?? w / 2).strength((n) => multiCluster && n.group ? 0.14 : 0.02)).force("y", forceY((n) => groupTarget.get(n.group ?? "")?.y ?? h / 2).strength((n) => multiCluster && n.group ? 0.14 : 0.02)).stop();
|
|
35574
35574
|
for (let i = 0; i < 300; i++) simulation.tick();
|
|
35575
35575
|
const pad = nodeSpacing / 2;
|
|
35576
35576
|
const rectsOf = (n) => {
|
package/dist/runtime/index.cjs
CHANGED
|
@@ -34741,7 +34741,7 @@ function measureLabelWidth(text, fontFamily = "system-ui") {
|
|
|
34741
34741
|
return labelMeasureCtx.measureText(text).width + 4;
|
|
34742
34742
|
}
|
|
34743
34743
|
function getGroupColor(group, groups) {
|
|
34744
|
-
if (!group) return GROUP_COLORS2[0];
|
|
34744
|
+
if (!group) return groups.length > 0 ? "var(--color-muted-foreground)" : GROUP_COLORS2[0];
|
|
34745
34745
|
const idx = groups.indexOf(group);
|
|
34746
34746
|
return GROUP_COLORS2[idx % GROUP_COLORS2.length];
|
|
34747
34747
|
}
|
|
@@ -34980,7 +34980,7 @@ var init_GraphCanvas = __esm({
|
|
|
34980
34980
|
const edgeLinks = propEdges.filter((e) => present.has(e.source) && present.has(e.target)).map((e) => ({ source: e.source, target: e.target, weight: clamp01(e.weight ?? 1) }));
|
|
34981
34981
|
const simLinks = activeSimilarity.filter((p) => present.has(p.source) && present.has(p.target)).map((p) => ({ source: p.source, target: p.target, weight: clamp01(p.weight) }));
|
|
34982
34982
|
const collideRadius = (n) => Math.max(n.size || 8, (n.labelW ?? 0) / 2) + nodeSpacing / 2;
|
|
34983
|
-
const simulation = d3Force.forceSimulation(simNodes).force("edge", d3Force.forceLink(edgeLinks).id((d) => d.id).distance((l) => linkDistance * (0.35 + (1 - l.weight) * 0.3)).strength(0.9)).force("similarity", d3Force.forceLink(simLinks).id((d) => d.id).distance((l) => linkDistance * (1.35 - 0.55 * l.weight)).strength(0.03)).force("charge", d3Force.forceManyBody().strength(-repulsion * 0.5)).force("collide", d3Force.forceCollide().radius(collideRadius).strength(0.9)).force("x", d3Force.forceX((n) => groupTarget.get(n.group ?? "")?.x ?? w / 2).strength(multiCluster ? 0.
|
|
34983
|
+
const simulation = d3Force.forceSimulation(simNodes).force("edge", d3Force.forceLink(edgeLinks).id((d) => d.id).distance((l) => linkDistance * (0.35 + (1 - l.weight) * 0.3)).strength(0.9)).force("similarity", d3Force.forceLink(simLinks).id((d) => d.id).distance((l) => linkDistance * (1.35 - 0.55 * l.weight)).strength(0.03)).force("charge", d3Force.forceManyBody().strength(-repulsion * 0.5)).force("collide", d3Force.forceCollide().radius(collideRadius).strength(0.9)).force("x", d3Force.forceX((n) => groupTarget.get(n.group ?? "")?.x ?? w / 2).strength((n) => multiCluster && n.group ? 0.14 : 0.02)).force("y", d3Force.forceY((n) => groupTarget.get(n.group ?? "")?.y ?? h / 2).strength((n) => multiCluster && n.group ? 0.14 : 0.02)).stop();
|
|
34984
34984
|
for (let i = 0; i < 300; i++) simulation.tick();
|
|
34985
34985
|
const pad = nodeSpacing / 2;
|
|
34986
34986
|
const rectsOf = (n) => {
|
package/dist/runtime/index.js
CHANGED
|
@@ -34697,7 +34697,7 @@ function measureLabelWidth(text, fontFamily = "system-ui") {
|
|
|
34697
34697
|
return labelMeasureCtx.measureText(text).width + 4;
|
|
34698
34698
|
}
|
|
34699
34699
|
function getGroupColor(group, groups) {
|
|
34700
|
-
if (!group) return GROUP_COLORS2[0];
|
|
34700
|
+
if (!group) return groups.length > 0 ? "var(--color-muted-foreground)" : GROUP_COLORS2[0];
|
|
34701
34701
|
const idx = groups.indexOf(group);
|
|
34702
34702
|
return GROUP_COLORS2[idx % GROUP_COLORS2.length];
|
|
34703
34703
|
}
|
|
@@ -34936,7 +34936,7 @@ var init_GraphCanvas = __esm({
|
|
|
34936
34936
|
const edgeLinks = propEdges.filter((e) => present.has(e.source) && present.has(e.target)).map((e) => ({ source: e.source, target: e.target, weight: clamp01(e.weight ?? 1) }));
|
|
34937
34937
|
const simLinks = activeSimilarity.filter((p) => present.has(p.source) && present.has(p.target)).map((p) => ({ source: p.source, target: p.target, weight: clamp01(p.weight) }));
|
|
34938
34938
|
const collideRadius = (n) => Math.max(n.size || 8, (n.labelW ?? 0) / 2) + nodeSpacing / 2;
|
|
34939
|
-
const simulation = forceSimulation(simNodes).force("edge", forceLink(edgeLinks).id((d) => d.id).distance((l) => linkDistance * (0.35 + (1 - l.weight) * 0.3)).strength(0.9)).force("similarity", forceLink(simLinks).id((d) => d.id).distance((l) => linkDistance * (1.35 - 0.55 * l.weight)).strength(0.03)).force("charge", forceManyBody().strength(-repulsion * 0.5)).force("collide", forceCollide().radius(collideRadius).strength(0.9)).force("x", forceX((n) => groupTarget.get(n.group ?? "")?.x ?? w / 2).strength(multiCluster ? 0.
|
|
34939
|
+
const simulation = forceSimulation(simNodes).force("edge", forceLink(edgeLinks).id((d) => d.id).distance((l) => linkDistance * (0.35 + (1 - l.weight) * 0.3)).strength(0.9)).force("similarity", forceLink(simLinks).id((d) => d.id).distance((l) => linkDistance * (1.35 - 0.55 * l.weight)).strength(0.03)).force("charge", forceManyBody().strength(-repulsion * 0.5)).force("collide", forceCollide().radius(collideRadius).strength(0.9)).force("x", forceX((n) => groupTarget.get(n.group ?? "")?.x ?? w / 2).strength((n) => multiCluster && n.group ? 0.14 : 0.02)).force("y", forceY((n) => groupTarget.get(n.group ?? "")?.y ?? h / 2).strength((n) => multiCluster && n.group ? 0.14 : 0.02)).stop();
|
|
34940
34940
|
for (let i = 0; i < 300; i++) simulation.tick();
|
|
34941
34941
|
const pad = nodeSpacing / 2;
|
|
34942
34942
|
const rectsOf = (n) => {
|