From 204a30ce34ca760d339aaece64c7886227c1cd5a Mon Sep 17 00:00:00 2001 From: Andrey Kuvshinov Date: Wed, 29 Apr 2020 16:34:33 +0300 Subject: [PATCH] correct width small canvas --- app/pub/scripts/anviewer.js | 7 ++++--- app/views/layout.phtml | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/pub/scripts/anviewer.js b/app/pub/scripts/anviewer.js index 373fa13..2209340 100644 --- a/app/pub/scripts/anviewer.js +++ b/app/pub/scripts/anviewer.js @@ -129,10 +129,11 @@ function startpdfviewer(){ czoom = getzoom(); - if (czoom != null) - div.style.width = czoom+"%"; - + if (czoom != null & czoom > 10) { + div.style.width = czoom+"%" + } + pdfjsLib.getDocument(url).promise.then(function(pdfDoc_) { pdfDoc = pdfDoc_; diff --git a/app/views/layout.phtml b/app/views/layout.phtml index 52a2fbe..ee4f62f 100644 --- a/app/views/layout.phtml +++ b/app/views/layout.phtml @@ -2,7 +2,7 @@ Еженедельник Аргументы Недели - <?=$title?> - +