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

Room UI Redesign: Add useResizeViewport hook #3533

Merged
merged 3 commits into from
Dec 19, 2020

Conversation

robertlong
Copy link
Contributor

@robertlong robertlong commented Dec 10, 2020

This new hook manages the canvas size and viewport resolution. It overrides the internal AFrame resize handler and replaces our set-max-resolution component. By doing so we can ensure that the maximum resolution is always respected and resizing the viewport via the sidebar opening/closing, etc. is handled correctly.

Fixes #3524

Copy link
Contributor

@brianpeiris brianpeiris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just minor comment. LGTM otherwise.

objectFocused={!!this.props.selectedObject}
streaming={streaming}
onResizeViewport={this.onResizeViewport}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You removed the reference to this.onResizeViewport here, but the method still exists and is now unused.

@robertlong robertlong merged commit dca9d1a into room-ui-redesign Dec 19, 2020
@robertlong robertlong deleted the redesign/use-resize-viewport branch December 19, 2020 03:51
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

Successfully merging this pull request may close these issues.

Viewport is resized when sidebar is open and pause menu is opened
2 participants