-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Nested CCLayouts #887
Labels
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When there are several levels of nested CCLayouts, and the lowest one needs layout, it takes several frames to update the whole hierarchy. The lowest CCLayout will be updated at the first frame, its parent will be updated next frame and so on. Cause of this there are noticeable flickers, that looks bad.
It could be overcome by adding this code into the needsLayout method:
But it results in layout method being called two times at one frame for all layouts in hierarchy except the lowest one. To fix this additional member variable called _layoutGuard could be added like this:
But this is not very good solution in my opinion. Maybe there is a better one.
The text was updated successfully, but these errors were encountered: