mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Update plugin.js
This commit is contained in:
parent
fa7a9aaee6
commit
d8e22f68bd
1 changed files with 6 additions and 7 deletions
|
@ -280,18 +280,17 @@ export class PdfPlayer {
|
||||||
this.book.getPage(number).then(page => {
|
this.book.getPage(number).then(page => {
|
||||||
const width = dom.getWindowSize().innerWidth;
|
const width = dom.getWindowSize().innerWidth;
|
||||||
const height = dom.getWindowSize().innerHeight;
|
const height = dom.getWindowSize().innerHeight;
|
||||||
|
|
||||||
const viewport = page.getViewport({ scale: 5 });
|
const viewport = page.getViewport({ scale: 5 });
|
||||||
const context = canvas.getContext('2d');
|
const context = canvas.getContext('2d');
|
||||||
canvas.width = viewport.width;
|
canvas.width = viewport.width;
|
||||||
canvas.height = viewport.height;
|
canvas.height = viewport.height;
|
||||||
|
|
||||||
if (width<height) {
|
if (width < height) {
|
||||||
canvas.style.width = "100%";
|
canvas.style.width = '100%';
|
||||||
canvas.style.height = "auto";
|
canvas.style.height = 'auto';
|
||||||
} else {
|
} else {
|
||||||
canvas.style.height = "100%";
|
canvas.style.height = '100%';
|
||||||
canvas.style.width = "auto";
|
canvas.style.width = 'auto';
|
||||||
}
|
}
|
||||||
|
|
||||||
const renderContext = {
|
const renderContext = {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue