Closed huytr1995 closed 2 years ago
Ref: https://github.com/allenai/scholar/issues/33320
right now our zoom % can be 1.9% or 1,000,000%. This PR adding a threshold so thats our zoom % wont go beyond that for both in and out.
I set the cap limit for zoom out to be 25% and for zoom in to be 500%. User can't click above those.
Verify if i cant go below 25% or above 500%. Other than that yarn test, lint, format.
Before
https://user-images.githubusercontent.com/84343285/186496354-1f6ce24b-63fb-41d6-a446-b091fc2ba1a8.mov
After
https://user-images.githubusercontent.com/84343285/186496149-dcf697f7-39a5-4ffa-85d1-4f913662b680.mov
Not involved
Description
Ref: https://github.com/allenai/scholar/issues/33320
right now our zoom % can be 1.9% or 1,000,000%. This PR adding a threshold so thats our zoom % wont go beyond that for both in and out.
Reviewer Instructions
I set the cap limit for zoom out to be 25% and for zoom in to be 500%. User can't click above those.
Testing Plan
Verify if i cant go below 25% or above 500%. Other than that yarn test, lint, format.
Output / Screenshots
Before
https://user-images.githubusercontent.com/84343285/186496354-1f6ce24b-63fb-41d6-a446-b091fc2ba1a8.mov
After
https://user-images.githubusercontent.com/84343285/186496149-dcf697f7-39a5-4ffa-85d1-4f913662b680.mov
A11y
Not involved