Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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