Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In tree, add "end" and "after-end" as values for parent-position #444

Merged
merged 1 commit into from
Jan 10, 2024

Conversation

leyan
Copy link
Contributor

@leyan leyan commented Jan 8, 2024

This solves the issue I created last week (#429) and adds another layout choice where the parent is offset relative to the children.

Both values seem more useful for "right" and "left" direction, and actually, the "after-end" option seems more useful to me, as it allows to render a more hierarchical layout without overlapping, like this question asked on Discord: https://discord.com/channels/1054443721975922748/1193008120688037988

I did not change the existing behavior, but it was very surprising to me to see that when choosing "right" or "left" as direction, the nodes at filled from bottom to top, and it is necessary to choose "end" to have the parent on top. Is it that way for a reason? I would prefer a "before-beginning" rather than "after-end" to indicate that I want my parent above the children, it seems more intuitive to me.

@johannes-wolf johannes-wolf self-requested a review January 9, 2024 06:36
@johannes-wolf johannes-wolf added bug 🐛 Something isn't working lib:tree labels Jan 9, 2024
@johannes-wolf johannes-wolf merged commit 9027bae into cetz-package:0.2.0 Jan 10, 2024
1 check failed
@johannes-wolf
Copy link
Member

Thank you! I've added tests in PR #445.

johannes-wolf added a commit that referenced this pull request Jan 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working lib:tree
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants