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

support adaptive full height viewport controls #181

Open
axelpale opened this issue May 21, 2024 · 0 comments
Open

support adaptive full height viewport controls #181

axelpale opened this issue May 21, 2024 · 0 comments

Comments

@axelpale
Copy link
Contributor

Consider a viewport control that acts as a sidebar.

Currently Viewport reacts to 'resize' event that originates from ResizeCapturer. Upon resize, Viewport calls ViewportControls:adapt that maintains the relative positions of existing viewport controls.

A sidebar control has full height. This height does not adapt to viewport size change.

Possible solutions:

  • allow controls to have percentage width/height (does not work well for absolutely positioned elements)
  • keep relative size of the controls constant (does not work for buttons and other constant-sized controls)
  • add options how controls should adapt: e.g. boolean absoluteWidth, absoluteHeight, absoluteX, absoluteY.
  • create dedicated class for sidebar: e.g. SidebarControl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant