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

Children size/position of text element don't get updated after a text update #1109

Open
mcmorry opened this issue Feb 22, 2018 · 3 comments
Open
Labels
area: ui UI related issue bug

Comments

@mcmorry
Copy link
Contributor

mcmorry commented Feb 22, 2018

Set a text element as auto-size and add a child anchored on some edges of the text.
If you change the text string in the editor, the child of the text element follows updates its size and position, but not in play mode.

repro:
https://playcanvas.com/project/536769/overview/ui-issues

hit play, after 1 sec the text updates but the two squares don't move as expected

@SHADOWELITE7
Copy link
Contributor

I see the text
image

@mcmorry
Copy link
Contributor Author

mcmorry commented Feb 22, 2018

Hit play. The text will change but the red squares don't move as expected

@mcmorry
Copy link
Contributor Author

mcmorry commented Mar 4, 2018

I verified that this behavior is not related to the text element only.
If I resize by code any element, its children don't get notified, and I have to call a fake setLocalPosition to force them to update their position based on the anchor.

@willeastcott willeastcott added bug area: ui UI related issue labels Apr 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: ui UI related issue bug
Projects
None yet
Development

No branches or pull requests

3 participants