aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/zenserver/frontend/html/util/graphengine.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/zenserver/frontend/html/util/graphengine.js b/src/zenserver/frontend/html/util/graphengine.js
index 3ac4d97a7..276326a99 100644
--- a/src/zenserver/frontend/html/util/graphengine.js
+++ b/src/zenserver/frontend/html/util/graphengine.js
@@ -548,12 +548,14 @@ export class GraphEngine
const visible = Math.min(deps.length, MAX_VISIBLE_DEPS);
// push non-root node away from parent to make room for children
- if (parent && !node._skip_push)
+ // 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;
node.x += Math.cos(outward_angle) * push_dist;
node.y += Math.sin(outward_angle) * push_dist;
node.pinned = true;
+ node._was_pushed = true;
}
var arc_start, arc_span;