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

Aspect ratio respecting presenter #4103

Closed
michael-hawker opened this issue Jul 9, 2021 Discussed in #4060 · 0 comments · Fixed by #4104
Closed

Aspect ratio respecting presenter #4103

michael-hawker opened this issue Jul 9, 2021 Discussed in #4060 · 0 comments · Fixed by #4104
Assignees
Milestone

Comments

@michael-hawker
Copy link
Member

Discussed in #4060

Originally posted by chingucoding June 2, 2021
As a developer, sometimes the need arises to scale content based on the aspect ratio. E.g. when creating using UI Elements to convey diagrams (e.g. using Paths etc). Right now however, this is hardly possible. Developers could use ViewBox, however a ViewBox scales everything up meaning a border of 2px can become a border of 20px if the initial element was small and is getting scaled up to much. This is where the new [insert cool control name] control comes in that allows us to restrict an control to a specific aspect ratio but also allows it to scale up/scale down based on the available space.

Possible AC:

  • If a control is placed in it, and it takes up the entire space, the aspect ratio will stay constant
  • Developers can specify the aspect ratio
  • The control take all the space available that would still result in respecting the aspect ratio
  • Setting MinWidth, MinHeight, MaxWidth, and MaxHeight all is being respected by the control
  • HorizontalAlignment and VerticalAlignment is being respected correctly
  • Changes in size for the control result in it's content being updated
  • An aspect ratio of 1:4 is different than an aspect ratio of 4:1 (first one is wide, second one is narrow)
@michael-hawker michael-hawker added this to the 7.1 milestone Jul 9, 2021
@michael-hawker michael-hawker self-assigned this Jul 9, 2021
@ghost ghost added the In-PR 🚀 label Jul 9, 2021
@ghost ghost added Completed 🔥 and removed In-PR 🚀 labels Aug 3, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Nov 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant