allenai / pdf-component-library

44 stars 4 forks source link

Fix Blurry Issue on Semantic Reader_Part2 #185

Closed huytr1995 closed 2 years ago

huytr1995 commented 2 years ago

Description

Ref: https://github.com/allenai/scholar/issues/33334

This PR adds detection for scale and devicePixelRatio so i can repopulate image when u zoom in or switch from one monitor to another monitor.

Reviewer Instructions

This PR adds detection for scale and devicePixelRatio so i can repopulate image when u zoom in or switch from one monitor to another monitor. Every time when user changes scale or change monitor it flushes out old image and repopulate a new one.

Testing Plan

Verify page loading again when u zoom or when device pixel ratio change. Other than that yarn lint, format, test.

Output / Screenshots

https://user-images.githubusercontent.com/84343285/186980735-9258effc-928c-4acd-b9b3-214ea68eddac.mov

A11y

No A11y involvement.