From 979e6f20cd48c15c2c1f743e349b45a2c823ad9b Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Fri, 3 Jan 2020 13:15:59 +0000 Subject: [PATCH] fix #3298 @2 --- inc/ws/Metier/class.ws.book.parametres.php | 3 ++- inc/ws/Util/html5/master/class.ws.html5.compiler.php | 12 ++++++++++-- inc/ws/Util/html5/master/class.ws.html5.links.php | 2 +- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/inc/ws/Metier/class.ws.book.parametres.php b/inc/ws/Metier/class.ws.book.parametres.php index 87aca5849..a0c7728bc 100644 --- a/inc/ws/Metier/class.ws.book.parametres.php +++ b/inc/ws/Metier/class.ws.book.parametres.php @@ -399,6 +399,7 @@ class wsBookParametres extends wsParametres $this->fields['permanentLinks'] = array('type' => 'boolean', 'default' => false, 'editable' => true, 'label' => __('Liens visibles en permanence'), 'grade' => 3); $this->fields['ignoreLinksTypes'] = array('type' => 'text', 'default' => '', 'editable' => true, 'label' => __('Ignorer les liens de type'), 'hint' => __('Liste des numéros séparés par des virgules'), 'grade' => 5); $this->fields['linkBlinkTime'] = array('type' => 'float', 'default' => 1.0, 'editable' => true, 'label' => __("Temps d'apparition du lien à l'ouverture de la page (en secondes)")); + $this->fields['linkBlinkRepetition'] = ['type' => 'integer', 'default' => 1, 'editable' => true, 'label' => __('Nombre de clignotement lors de l\'apparition des liens')]; $this->fields['linkTooltipManager'] = array('type' => 'text', 'default' => '', 'editable' => true, 'label' => __("Gestionnaire des info-bulles"), 'grade' => 5); $this->fields['linkTracker'] = array('type' => 'text', 'default' => '', 'editable' => true, 'label' => __('Tracking des liens'), 'grade' => 5); $this->fields['linkTrackerRegexp'] = array('type' => 'text', 'default' => '', 'editable' => true, 'label' => __('Tracking des liens applicables aux liens du domaine'), 'grade' => 5); @@ -417,7 +418,7 @@ class wsBookParametres extends wsParametres $this->fields['textPopupWidth'] = ['type' => 'integer', 'default' => '600', 'editable' => true, 'label' => __('Largeur optimale des popups')]; $this->fields['iframePopupMaxWidth'] = ['type' => 'integer', 'default' => '0', 'editable' => true, 'label' => __('Largeur maximale des popups iframe')]; $this->forms['multimedia'] = array('label' => __('Liens et multimédia'), - 'fieldsnames' => array('permanentLinks', 'linkBlinkTime', 'customLinkClass', 'ignoreLinksTypes', 'linkTooltipManager', 'linkCornerSize', 'linkTooltipMaxWidth', '|', 'linkTracker', 'linkTrackerRegexp', '|', 'linkFilePrefix', '|', 'linkMultimediaPerformanceMode', 'linkMultimediaQuality', '|', 'inlineSlideshowTransitionDuration', 'inlineSlideshowDuration', '|', 'videoReset', 'videoBigPlay', '|', 'brightcovePlayerId', 'brightcovePlayerSecret', '|', 'textPopupStylesheet', 'textPopupWidth', '|', 'iframePopupMaxWidth')); + 'fieldsnames' => array('permanentLinks', 'linkBlinkTime', 'linkBlinkRepetition', '|', 'customLinkClass', 'ignoreLinksTypes', 'linkTooltipManager', 'linkCornerSize', 'linkTooltipMaxWidth', '|', 'linkTracker', 'linkTrackerRegexp', '|', 'linkFilePrefix', '|', 'linkMultimediaPerformanceMode', 'linkMultimediaQuality', '|', 'inlineSlideshowTransitionDuration', 'inlineSlideshowDuration', '|', 'videoReset', 'videoBigPlay', '|', 'brightcovePlayerId', 'brightcovePlayerSecret', '|', 'textPopupStylesheet', 'textPopupWidth', '|', 'iframePopupMaxWidth')); //. $this->fields['product_zoom_references'] = array('type' => 'freefile', 'default' => '', 'editable' => true, 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 6e8ecef58..c52cc69ca 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.compiler.php +++ b/inc/ws/Util/html5/master/class.ws.html5.compiler.php @@ -176,6 +176,7 @@ class wsHTML5Compiler public $cssOneWidth; public $cssOneHeight; public $cssScale; + public $linkScale; public $cssSVGScale; public $optimalWidth = 567; public $optimalHeight = 709; @@ -283,7 +284,7 @@ class wsHTML5Compiler $imagesize = CubeIT_Image::getimagesize($firstJpeg); $this->pdf2htmlRatio = round(($imagesize[0] * 0.48) / $this->width, 3); - $this->cssScale = $this->z * min($this->optimalWidth / $this->width, $this->optimalHeight / $this->height); + $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); $this->cssWidth = $this->width * $this->cssScale; @@ -305,11 +306,13 @@ class wsHTML5Compiler 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->multiply = $this->pdf2htmlRatio; + $this->initMobileFirst(); } @@ -525,6 +528,11 @@ class wsHTML5Compiler return $this->cssScale; } + public function getLinkScale() + { + return $this->linkScale; + } + public function virtualToPhysical($virtual) { if (isset($this->pageLabels[$virtual])) { diff --git a/inc/ws/Util/html5/master/class.ws.html5.links.php b/inc/ws/Util/html5/master/class.ws.html5.links.php index 9a40dd320..5c4c775b7 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.links.php +++ b/inc/ws/Util/html5/master/class.ws.html5.links.php @@ -357,7 +357,7 @@ class wsHTML5Link public function getCssScale() { if (is_int($this->page)) { - return $this->compiler->getCssScale(); + return $this->compiler->getLinkScale(); } else { return 1; } -- 2.39.5