]> _ Git - cubeextranet.git/commitdiff
done #1886 @1
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 18 Jan 2018 18:00:57 +0000 (18:00 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 18 Jan 2018 18:00:57 +0000 (18:00 +0000)
inc/ws/Util/html5/master/class.ws.html5.compiler.php
inc/ws/Util/html5/master/class.ws.html5.links.php

index 16f0b21b4076b3ffe794284743f84f55c285e960..8682fcd39a62a26e9a46fdb2c1b160365da2b02c 100644 (file)
@@ -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)) {
index 3adb4f6c0f87fe660b5d8dccb3e07b2b84c00a3f..497fc39b19a4407e423f480adf6c983e2794cef0 100644 (file)
@@ -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%');