Retina Hidpi display
- Dominant language
- JavaScript
- Stars
- 32
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
That's great. But it doesn't work at best on mobile devices or generally hidpi screens.
I have found that if I change a value in the viewport definition
` var viewport = page.getViewport(domMapObject.canvas.width / page.getViewport(0.5).width);`
instead of
`var viewport = page.getViewport(domMapObject.canvas.width / page.getViewport(1).width);`
on line 818 of app.js
make it work at retina resolution
But it works only at first. when you change page and revert back, the page is left black.
I can't find what happen when it go back to a page already drawn and why it left it all black.
How could I fix this ?
Where the viewport value is reset in some way ?
Thanks
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in app.js around line 818 and reproduce the issue on a Retina or other HiDPI display by changing pages and returning to an already drawn page. Trace how the viewport value and canvas state are handled; done means pages render at the intended resolution without becoming black after navigation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100