From: vincent@cubedesigners.com Date: Thu, 18 Jan 2018 18:00:57 +0000 (+0000) Subject: done #1886 @1 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=94804efa09c046686338ae19c31bea16d6552681;p=cubeextranet.git done #1886 @1 --- 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 16f0b21b4..8682fcd39 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.compiler.php +++ b/inc/ws/Util/html5/master/class.ws.html5.compiler.php @@ -1155,7 +1155,7 @@ class wsHTML5Compiler { $docdir = wsDocument::getDir($infos['document_id']); if ($this->svg) { $full = $docdir . 'html/fp' . $infos['document_page'] . '.svg'; - $fullopt = $docdir . 'html/fo' . $infos['document_page'] . '.svg'; + $fullopt = $docdir . 'html/fo' . $infos['document_page'] . '%s.svg'; $orig = $docdir . 'html/tp' . $infos['document_page'] . '.svg'; $opt = $docdir . 'html/to' . $infos['document_page'] . '.svg'; @@ -1168,7 +1168,7 @@ class wsHTML5Compiler { } wsDocument::extractTexts($full, $orig); wsTools::optimizeSVG($orig, $opt); - wsTools::optimizeSVG($full, $fullopt); + wsTools::optimizeSVG($full, $fullopt, [150, 300]); if (in_array($page, $this->config->vectorPages)) { 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 3adb4f6c0..497fc39b1 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.links.php +++ b/inc/ws/Util/html5/master/class.ws.html5.links.php @@ -29,6 +29,7 @@ class wsHTML5Link { public $rot; public $class; public $uid; + public $zindex = 4; protected $_init; @@ -262,6 +263,11 @@ class wsHTML5Link { } } + public function getCSSZIndex() { + $zindex = (($this->zindex + 1) * 1000) - min(999, round(($this->width * $this->height) / 300)); + return 'z-index:' . $zindex . ';'; + } + public function getCSSContainer() { if (!($this instanceof contentLink) && $this->page % 2 == 1) { $this->page--; @@ -271,6 +277,7 @@ class wsHTML5Link { $css = '#l_' . $this->id . '{'; $css .= 'left:' . round($this->left * $this->getCssScale()) . 'px;top:' . round($this->top * $this->getCssScale()) . 'px;'; $css .= 'width:' . round($this->width * $this->getCssScale()) . 'px;height:' . round($this->height * $this->getCssScale()) . 'px;'; + $css .= $this->getCSSZIndex(); $origin = false; if ($this->rot) { $css .= wsHTML5::writeCSSUA('transform', 'rotate(' . $this->rot . 'deg)'); @@ -280,6 +287,7 @@ class wsHTML5Link { $css .= wsHTML5::writeCSSUA('transform', 'skewX(' . $this->extra->skewX . 'deg)'); $origin = true; } + $css .= $this->getCSS(); $css .= '}'; return $css; @@ -360,6 +368,8 @@ class tooltipLink extends normalLink { } class htmlMultimediaImage extends wsHTML5Link { + public $zindex = 2; + public function getHTMLContainerClass() { return parent::getHTMLContainerClass() . ' multimedia'; } @@ -416,6 +426,7 @@ class htmlMultimediaPopupImage extends normalLink { } class contentLink extends wsHTML5Link { + public $zindex = 1; public function getHTMLContainerClass() { return parent::getHTMLContainerClass() . ' contentLink'; @@ -424,6 +435,8 @@ class contentLink extends wsHTML5Link { } class eventOverlayLink extends wsHTML5Link { + public $zindex = 3; + public function getHTMLContainerClass() { return parent::getHTMLContainerClass() . ' eventOverlayLink'; } @@ -517,6 +530,8 @@ class internalLink extends normalLink { } class videoLink extends wsHTML5Link { + public $zindex = 2; + public static function addVideoJS($compiler) { $compiler->addJs('js/libs/videojs/video.withscalefix.js'); $compiler->addLess('videojs/videojs'); @@ -832,6 +847,7 @@ class htmlMultimediaLink extends wsHTML5Link { protected $_config = null; protected $_content = ''; protected $_url; + public $zindex = 2; public function getHTMLContent() { if ($this->_content == '') { @@ -930,6 +946,7 @@ class htmlMultimediaLink extends wsHTML5Link { $css = '#l_' . $this->id . '{'; $css .= 'left:' . $this->left * $this->getCssScale() . 'px;top:' . $this->top * $this->getCssScale() . 'px;'; $css .= 'width:' . $this->_config['width'] . 'px;height:' . $this->_config['height'] . 'px;'; + $css .= $this->getCSSZIndex(); $css .= $this->getCSS(); $css .= '}'; return $css; @@ -1158,6 +1175,7 @@ class inpesPopinLink extends htmlMultimediaLink { $css = '#l_' . $this->id . '{'; $css .= 'left:' . $this->left * $this->getCssScale() . 'px;top:' . $this->top * $this->getCssScale() . 'px;'; $css .= 'width:' . $this->width * $this->getCssScale() . 'px;height:' . $this->height * $this->getCssScale() . 'px;'; + $css .= $this->getCSSZIndex(); if ($this->rot) { $css .= wsHTML5::writeCSSUA('transform', 'rotate(' . $this->rot . 'deg)'); $css .= wsHTML5::writeCSSUA('transform-origin', '0% 0%');