Merge branch 'dev'
This commit is contained in:
commit
fea7e09c04
|
|
@ -983,6 +983,15 @@ class FolkGraphViewer extends HTMLElement {
|
||||||
return link.type === "delegates_to" ? 0.15 : 0;
|
return link.type === "delegates_to" ? 0.15 : 0;
|
||||||
})
|
})
|
||||||
.linkCurveRotation("rotation")
|
.linkCurveRotation("rotation")
|
||||||
|
.linkVisibility((link: any) => {
|
||||||
|
// Hide links whose endpoints haven't been positioned yet
|
||||||
|
// (prevents TubeGeometry NaN errors during force warmup)
|
||||||
|
const s = link.source, t = link.target;
|
||||||
|
if (!s || !t) return false;
|
||||||
|
const sx = typeof s === "object" ? s.x : undefined;
|
||||||
|
const tx = typeof t === "object" ? t.x : undefined;
|
||||||
|
return sx != null && !isNaN(sx) && tx != null && !isNaN(tx);
|
||||||
|
})
|
||||||
.linkOpacity(0.6)
|
.linkOpacity(0.6)
|
||||||
.linkDirectionalArrowLength((link: GraphEdge) => {
|
.linkDirectionalArrowLength((link: GraphEdge) => {
|
||||||
if (link.type === "cross_layer_flow") return 3;
|
if (link.type === "cross_layer_flow") return 3;
|
||||||
|
|
@ -1040,7 +1049,7 @@ class FolkGraphViewer extends HTMLElement {
|
||||||
})
|
})
|
||||||
.d3AlphaDecay(0.02)
|
.d3AlphaDecay(0.02)
|
||||||
.d3VelocityDecay(0.3)
|
.d3VelocityDecay(0.3)
|
||||||
.warmupTicks(50)
|
.warmupTicks(100)
|
||||||
.cooldownTicks(150);
|
.cooldownTicks(150);
|
||||||
|
|
||||||
this.graph = graph;
|
this.graph = graph;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue