mirror of
https://github.com/anyproto/anytype-ts.git
synced 2025-06-09 09:35:02 +09:00
Link distance and node radius updates
This commit is contained in:
parent
d3dcc58ff7
commit
6ab7e6516b
1 changed files with 2 additions and 2 deletions
4
dist/workers/graph.js
vendored
4
dist/workers/graph.js
vendored
|
@ -172,7 +172,7 @@ initForces = () => {
|
|||
simulation.force('link')
|
||||
.links(edges)
|
||||
.distance(link.distance)
|
||||
.strength(d => d.source.layout == d.target.layout ? 1 : 0.5);
|
||||
.strength(d => d.source.type == d.target.type ? 1 : 0.5);
|
||||
|
||||
simulation.force('forceX')
|
||||
.strength(d => d.isOrphan ? forceX.strength : 0)
|
||||
|
@ -802,7 +802,7 @@ const getRadius = (d) => {
|
|||
maxEdges = Math.max(maxEdges, e);
|
||||
|
||||
if (maxEdges > 0) {
|
||||
k += e / maxEdges;
|
||||
k += Math.min(1, e / maxEdges);
|
||||
};
|
||||
|
||||
return d.radius / transform.k * k;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue