From 9e528a032182ce893e5343f86528b6b610b14f35 Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Wed, 8 Jan 2020 17:12:19 +0000 Subject: [PATCH] fix #3315 @0.5 --- .../html5/master/class.ws.html5.compiler.php | 24 +++++++++---------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/inc/ws/Util/html5/master/class.ws.html5.compiler.php b/inc/ws/Util/html5/master/class.ws.html5.compiler.php index c52cc69ca..dce8724bc 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.compiler.php +++ b/inc/ws/Util/html5/master/class.ws.html5.compiler.php @@ -282,7 +282,7 @@ class wsHTML5Compiler $firstJpeg = wsDocument::getDir($this->pages[1]['document_id']) . 'html/h150-' . $this->pages[1]['document_page'] . '.jpg'; $imagesize = CubeIT_Image::getimagesize($firstJpeg); - $this->pdf2htmlRatio = round(($imagesize[0] * 0.48) / $this->width, 3); + $this->pdf2htmlRatio = round(($imagesize[0] * 0.48) / $this->width, 8); $this->linkScale = $this->cssScale = $this->z * min($this->optimalWidth / $this->width, $this->optimalHeight / $this->height); $this->cssOneScale = $this->z * min(($this->optimalWidth * 2) / $this->width, $this->optimalHeight / $this->height); @@ -297,25 +297,23 @@ class wsHTML5Compiler $this->scale = 1; - if ($this->book->parametres->zoomMode == 1) { - $this->multiply = $this->pdf2htmlRatio * $this->scale * $this->cssOneScale; - } else { - $this->multiply = $this->pdf2htmlRatio * $this->scale * $this->cssScale; - } + $this->numerotation = explode(',', $this->book->numerotation); if ($this->book->parametres->mobileNavigationType === 'mobilefirst') { $this->cssScale = $this->cssOneScale = 480 / $this->width; - $this->multiply = $this->pdf2htmlRatio; - $this->linkScale = $this->cssScale * $this->multiply; - $this->cssWidth = $this->width * $this->cssScale; - $this->cssHeight = $this->height * $this->cssScale; - $this->cssOneWidth = $this->cssWidth; - $this->cssOneHeight = $this->cssHeight; - + $this->linkScale = $this->cssScale; + $this->cssOneWidth = $this->cssWidth = $this->width * $this->cssScale; + $this->cssOneHeight = $this->cssHeight = $this->height * $this->cssScale; $this->initMobileFirst(); } + if ($this->book->parametres->zoomMode == 1 || $this->book->parametres->mobileNavigationType === 'mobilefirst') { + $this->multiply = $this->pdf2htmlRatio * $this->scale * $this->cssOneScale; + } else { + $this->multiply = $this->pdf2htmlRatio * $this->scale * $this->cssScale; + } + $this->initConfig(); $this->log('Defined dimensions'); } -- 2.39.5