Skip to content

fix(stacking): align siblings horizontally#8

Merged
tauseefk merged 8 commits into
mainfrom
t/fix-shorter-subtree-expansion
May 21, 2026
Merged

fix(stacking): align siblings horizontally#8
tauseefk merged 8 commits into
mainfrom
t/fix-shorter-subtree-expansion

Conversation

@tauseefk
Copy link
Copy Markdown
Owner

@tauseefk tauseefk commented May 21, 2026

fix(stacking): align siblings horizontally and expand shallow subtrees

[conjecture] Horizontal alignment of siblings cannot be calculated merely from the following attributes of a node:

  • the depth of it's subtree
  • it's distance from the root

I don't fully agree with this, if I have a left offset, and know how many nodes need to be laid out in each branch, it should be possible to calculate their width. However, the robot disagrees.
So, in this current solution, I store the height of the entire cluster (all subtrees) at each node to determine it's left offset. The subtree depth still determines the width of each node.

@tauseefk tauseefk changed the title T/fix shorter subtree expansion fix(stacking): align siblings horizontally May 21, 2026
@tauseefk tauseefk merged commit c33a8a1 into main May 21, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant