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

Max cap on scale #905 #1128

Merged
merged 2 commits into from
Aug 23, 2021
Merged

Max cap on scale #905 #1128

merged 2 commits into from
Aug 23, 2021

Conversation

Vishalghyv
Copy link
Contributor

@Vishalghyv Vishalghyv commented Aug 21, 2021

Adds max cap scaling

Adding very large value for scroll or scrolling too much for Zoom can lead to unexpected behavior in many cases.

Behavior I can reproduce:
In Mozilla, the browser simply crashes with large value
In chrome, zoom leads to Infinity value and the website stops responding

Issue linked #905

Solutions I could think of :-
1 - To add max cap on scaling
2 - There could be a notification to user that large value of scaling can lead to breakage in computation, but user can click okay and continue.
3 - Check at which point the zooming will lead to no change in result, like when we reach a zoomed single pixel, then just keep increasing the scale without actually zooming.

The first was the easiest to implement. PTAL,
Thanks

@google-cla google-cla bot added the CLA: Yes label Aug 21, 2021
@jakearchibald
Copy link
Collaborator

1 seems like the best option to me, and it's consistent with what we do with minimum scale. Thank you!

@jakearchibald jakearchibald merged commit 14c3d19 into GoogleChromeLabs:dev Aug 23, 2021
@jakearchibald
Copy link
Collaborator

Deploying to live

@Vishalghyv
Copy link
Contributor Author

I can test it on the site :) thanks

This was referenced Aug 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants