From 2b243a7514763f2cfc16d20712dffa7265dd5f75 Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Fri, 17 Feb 2017 14:57:46 +0000 Subject: [PATCH] fix #1161 @2 --- inc/ws/DAO/class.ws.dao.book.php | 6 ++++++ inc/ws/Util/html5/class.ws.html5.compiler.php | 9 +++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/inc/ws/DAO/class.ws.dao.book.php b/inc/ws/DAO/class.ws.dao.book.php index 87d1c186b..a16cec5af 100644 --- a/inc/ws/DAO/class.ws.dao.book.php +++ b/inc/ws/DAO/class.ws.dao.book.php @@ -1204,6 +1204,7 @@ class wsDAOBook extends commonDAO { $index = ''; $textes = ''; + $pageLabels = array(); $hash = $book_id; $hash .= 'kjgl!az4.'; @@ -1282,6 +1283,10 @@ class wsDAOBook extends commonDAO { $audiodescription[$link['page']] = $link['to']; $ignoreLinks[] = $id; } + if ($link['type'] == 26) { + $pageLabels[$link['to']] = $link['page']; + $ignoreLinks[] = $id; + } } foreach ($ignoreLinks as $ignoreLink) { @@ -1300,6 +1305,7 @@ class wsDAOBook extends commonDAO { } $flex->addVariable('audiodescription', $audiodescription, false, true, "JSONObject"); + $flex->addVariable('pagelabels', $pageLabels, false, true, 'JSONObject'); $flex->addVariable('links', $links, false, true, 'JSONObject'); $flex->addVariable('signature', $exportSignature, false, true, 'JSONObject'); diff --git a/inc/ws/Util/html5/class.ws.html5.compiler.php b/inc/ws/Util/html5/class.ws.html5.compiler.php index de3b7af4b..fda34eb6b 100644 --- a/inc/ws/Util/html5/class.ws.html5.compiler.php +++ b/inc/ws/Util/html5/class.ws.html5.compiler.php @@ -113,6 +113,7 @@ class wsHTML5Compiler { protected $numerotation; protected $fontDocs = array(); protected $dir; + protected $z = 3; public $vdir; public $wdir; @@ -159,7 +160,7 @@ class wsHTML5Compiler { protected $home; protected $widget = true; protected $multiApp = false; - protected $pageLabels = array('two' => 2); + protected $pageLabels = array(); function __construct($book_id, $version = 'stable', $phonegap = false, $phonegapVersion = 'latest', $dir = null, $standalone = false, $appcache = false, $home = false) { global $core; @@ -223,8 +224,8 @@ class wsHTML5Compiler { $imagesize = getimagesize(wsDocument::getDir($this->pages[1]['document_id']) . 'html/h150-' . $this->pages[1]['document_page'] . '.jpg'); $this->pdf2htmlRatio = round(($imagesize[0] * 0.48) / $this->width, 3); - $this->cssScale = min($this->optimalWidth / $this->width, $this->optimalHeight / $this->height); - $this->cssOneScale = min(($this->optimalWidth * 2) / $this->width, $this->optimalHeight / $this->height); + $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); $this->cssWidth = $this->width * $this->cssScale; $this->cssHeight = $this->height * $this->cssScale; @@ -1261,7 +1262,7 @@ class wsHTML5Compiler { if (!isset($this->book->parametres->bookmarkCornerSize)) { $this->book->parametres->bookmarkCornerSize = 10; } - $size = round($this->width * $this->book->parametres->bookmarkCornerSize * 0.0075); + $size = round($this->width * $this->book->parametres->bookmarkCornerSize * 0.0075 * $this->z); $res[] = '#links .bookmark{width:' . $size . 'px;height:' . $size . 'px;background-size:' . $size . 'px ' . $size . 'px;}'; $res[] = '.portrait #fluidbook .bookmark.left{left:' . ($cssWidth - $size) . 'px;}'; -- 2.39.5