1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Update src/plugins/pdfPlayer/plugin.js

change the default value for scale.

Co-authored-by: Bill Thornton <thornbill@users.noreply.github.com>
This commit is contained in:
Zourlo 2023-03-15 16:27:58 +09:00 committed by GitHub
parent 695cdc6953
commit b61260ccb9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -281,7 +281,8 @@ export class PdfPlayer {
this.book.getPage(number).then(page => {
const width = dom.getWindowSize().innerWidth;
const height = dom.getWindowSize().innerHeight;
const viewport = page.getViewport({ scale: 5 });
const scale = Math.ceil(window.devicePixelRatio || 1);
const viewport = page.getViewport({ scale });
const context = canvas.getContext('2d');
canvas.width = viewport.width;
canvas.height = viewport.height;