From 6384d1c0204c4a450b8b494de3765abf5eec9c0c Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Thu, 10 Jun 2021 16:12:07 +0000 Subject: [PATCH] wait #4532 @1 --- .../html5/master/class.ws.html5.links.php | 36 ++++++++++++++++--- 1 file changed, 32 insertions(+), 4 deletions(-) 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 2094144e9..86f468457 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.links.php +++ b/inc/ws/Util/html5/master/class.ws.html5.links.php @@ -44,6 +44,7 @@ class wsHTML5Link public $borderColor = '#ffffff'; public $maxWidth = 0; public $wdir; + public $initialOrder = 0; public $gamifyCoins = 0; public $tooltipColor = null; public $tooltipBackgroundColor = null; @@ -380,6 +381,22 @@ class wsHTML5Link $this->init(); } + /** + * @param int $initialOrder + */ + public function setInitialOrder(int $initialOrder): void + { + $this->initialOrder = $initialOrder; + } + + /** + * @return int + */ + public function getInitialOrder(): int + { + return $this->initialOrder; + } + public function getDepth() { if ($this->zindex == -1 || null === $this->zindex || !$this->zindex) { @@ -526,10 +543,15 @@ class wsHTML5Link public function getCSSZIndex() { - $zindex = (($this->getDepth() + 1) * 1000) - min(999, round(($this->width * $this->height) / 300)); + $zindex = $this->getAddZIndex() + (($this->getDepth() + 1) * 1000) - min(999, round(($this->width * $this->height) / 300)); return 'z-index:' . $zindex . ';'; } + public function getAddZIndex() + { + return 0; + } + public function moveOnEvenPage() { return false; @@ -906,6 +928,7 @@ class htmlMultimediaPopupImage extends normalLink class contentLink extends wsHTML5Link { public $defaultZIndex = 30; + public $animZindex = 0; public function getHTMLContainerClass() { @@ -917,9 +940,9 @@ class contentLink extends wsHTML5Link $res = parent::getAdditionnalContent(); $animations = self::parseAnimations($this->image_rollover); foreach ($animations as $animation) { -// if (isset($animation['zindex'])) { -// $this->defaultZIndex = $animation['zindex']; -// } + if (isset($animation['zindex'])) { + $this->animZindex = $animation['zindex']; + } } $res .= ' data-animations="' . htmlspecialchars(json_encode($animations), ENT_QUOTES) . '" '; if ($this->_isHiddenFirst($animations)) { @@ -939,6 +962,11 @@ class contentLink extends wsHTML5Link } return false; } + + public function getAddZIndex() + { + return parent::getAddZIndex() + $this->animZindex; + } } class eventOverlayLink extends wsHTML5Link -- 2.39.5