aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMtBntChvn <[email protected]>2026-02-20 23:33:04 +0000
committerMtBntChvn <[email protected]>2026-02-20 23:33:04 +0000
commit6eebfe4cc8ff71229cd0b9b3cca8d001253cc48d (patch)
treedad38fae4e3388c1b8e3d7ce001fc7f9be46e5e8 /src
parentprevent re-push on collapse and re-expand (diff)
downloadzen-6eebfe4cc8ff71229cd0b9b3cca8d001253cc48d.tar.xz
zen-6eebfe4cc8ff71229cd0b9b3cca8d001253cc48d.zip
reduce expansion spread for tighter graph layout
Push distance: 400+6n → 200+4n Arc radius: 200+4n → 120+2.5n Jitter: 40 → 20 Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/zenserver/frontend/html/util/graphengine.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/zenserver/frontend/html/util/graphengine.js b/src/zenserver/frontend/html/util/graphengine.js
index 276326a99..56f825cdf 100644
--- a/src/zenserver/frontend/html/util/graphengine.js
+++ b/src/zenserver/frontend/html/util/graphengine.js
@@ -551,7 +551,7 @@ export class GraphEngine
// skip if already pushed once (collapse + re-expand) or re-expanding in place
if (parent && !node._skip_push && !node._was_pushed)
{
- const push_dist = 400 + visible * 6;
+ const push_dist = 200 + visible * 4;
node.x += Math.cos(outward_angle) * push_dist;
node.y += Math.sin(outward_angle) * push_dist;
node.pinned = true;
@@ -570,7 +570,7 @@ export class GraphEngine
arc_span = Math.PI;
}
- const radius = 200 + visible * 4;
+ const radius = 120 + visible * 2.5;
var added = 0;
for (const dep of deps)
@@ -583,7 +583,7 @@ export class GraphEngine
const t = visible > 1 ? added / (visible - 1) : 0.5;
const angle = arc_start + t * arc_span;
- const r = radius + Math.random() * 40;
+ const r = radius + Math.random() * 20;
const dep_node = this.add_node(
dep.opkey,
node.x + Math.cos(angle) * r,