-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Way to get absolute position in nested layout? #787
Comments
I know this is a bit late but did you get this sorted out? The C++ documentation is kinda sparse and i've been struggeling with the exact same problem for a while now. Thanks in advance :) |
There is no function you can use. I solve this by tracking the absolute positions |
Yeah i figured a way out myself, i just retrieve the X and Y position of my component in question, then check if it has a parent and if so, add it's X and Y to the component's X and Y, then return the result. Works pretty nicely :D |
YGNodeLayoutGetLeft() and YGNodeLayoutGetTop() return values relative to the parent.
Is there a way to get the absolute values in a nested layout that adds up all the parent positions?
The text was updated successfully, but these errors were encountered: