$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';
}
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)) {
public $rot;
public $class;
public $uid;
+ public $zindex = 4;
protected $_init;
}
}
+ 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--;
$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)');
$css .= wsHTML5::writeCSSUA('transform', 'skewX(' . $this->extra->skewX . 'deg)');
$origin = true;
}
+
$css .= $this->getCSS();
$css .= '}';
return $css;
}
class htmlMultimediaImage extends wsHTML5Link {
+ public $zindex = 2;
+
public function getHTMLContainerClass() {
return parent::getHTMLContainerClass() . ' multimedia';
}
}
class contentLink extends wsHTML5Link {
+ public $zindex = 1;
public function getHTMLContainerClass() {
return parent::getHTMLContainerClass() . ' contentLink';
}
class eventOverlayLink extends wsHTML5Link {
+ public $zindex = 3;
+
public function getHTMLContainerClass() {
return parent::getHTMLContainerClass() . ' eventOverlayLink';
}
}
class videoLink extends wsHTML5Link {
+ public $zindex = 2;
+
public static function addVideoJS($compiler) {
$compiler->addJs('js/libs/videojs/video.withscalefix.js');
$compiler->addLess('videojs/videojs');
protected $_config = null;
protected $_content = '';
protected $_url;
+ public $zindex = 2;
public function getHTMLContent() {
if ($this->_content == '') {
$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;
$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%');