From a935cb66ed0051ef09ded6076dbd2979957a2a6e Mon Sep 17 00:00:00 2001 From: Zourlo <7470935+Zourlo@users.noreply.github.com> Date: Mon, 13 Feb 2023 05:41:22 +0900 Subject: [PATCH] Update plugin.js --- src/plugins/pdfPlayer/plugin.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/plugins/pdfPlayer/plugin.js b/src/plugins/pdfPlayer/plugin.js index 6322d42778..11722315bd 100644 --- a/src/plugins/pdfPlayer/plugin.js +++ b/src/plugins/pdfPlayer/plugin.js @@ -284,15 +284,15 @@ export class PdfPlayer { const context = canvas.getContext('2d'); canvas.width = viewport.width; canvas.height = viewport.height; - - if (width < height) { - canvas.style.width = '100%'; - canvas.style.height = 'auto'; + + if (width < height) { + canvas.style.width = '100%'; + canvas.style.height = 'auto'; } else { - canvas.style.height = '100%'; - canvas.style.width = 'auto'; + canvas.style.height = '100%'; + canvas.style.width = 'auto'; } - + const renderContext = { canvasContext: context, viewport: viewport