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

Minor: changed docs for Layout::location (bottom-left -> top-left) & added test #500

Merged
merged 3 commits into from
Jun 25, 2023
Merged

Minor: changed docs for Layout::location (bottom-left -> top-left) & added test #500

merged 3 commits into from
Jun 25, 2023

Conversation

inobelar
Copy link
Contributor

Objective

Why did you make this PR?

I found a discrepancy between documentation and code behavior. As I can see (after playing with Style::padding), Layout::location represents top-left point of the node rect, not bottom-left.

Also I added test for it. I don't know where to add it, so I added it into src/tree/taffy_tree/tree.rs

@nicoburns nicoburns added the documentation Improvements or additions to documentation label Jun 20, 2023
@nicoburns
Copy link
Collaborator

I'm not entirely convinced the test is useful, but the documentation fix certainly is. Merging as-is, and we can always remove the test at a later date if want to.

@nicoburns nicoburns merged commit cbd5d1d into DioxusLabs:main Jun 25, 2023
16 checks passed
@inobelar inobelar deleted the layout_location_is_top_left branch June 25, 2023 22:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants