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

Misplaced UI element anchor gizmos if parent is a child of LayoutGroup #640

Closed
jpauloruschel opened this issue Dec 10, 2021 · 1 comment
Closed
Assignees
Labels
area: ui bug Something isn't working

Comments

@jpauloruschel
Copy link

jpauloruschel commented Dec 10, 2021

Description

Anchor gizmos for UI elements are using width and height, which leads to misplaced anchor representation and editing if the element is actually a child element of a layout. In that case, it should use calculatedWidth and calculatedHeight instead.

See image below: the anchor is set to [0, 0, 1, 1] (meaning bottom-left and top-right), but the gizmos are misplaced.

Screenshot 2021-12-10 at 16 46 42

Steps to Reproduce

  1. Create Element with LayoutGroup and fitting enabled
  2. Create a child Element with LayoutChild
  3. Create yet another child (below entity from point 2, making it a grand-child of the LayoutGroup). The anchor gizmos of this entity will not be correctly placed.
@jpauloruschel jpauloruschel self-assigned this Dec 10, 2021
@yaustar yaustar added the bug Something isn't working label Dec 10, 2021
@jpauloruschel jpauloruschel changed the title Misplaced UI element anchor gizmos if entity is a child of LayoutGroup Misplaced UI element anchor gizmos if parent is a child of LayoutGroup Dec 10, 2021
@jpauloruschel
Copy link
Author

Issue has been fixed and will be available in an upcoming Editor release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: ui bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants