From: vincent@cubedesigners.com Date: Wed, 2 Mar 2022 17:52:39 +0000 (+0000) Subject: wait #5139 @1.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=2636ff14e9a8fb5a340be58049af2b3765cedd55;p=cubeextranet.git wait #5139 @1.5 --- 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 ada06e070..2e614bfd0 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.compiler.php +++ b/inc/ws/Util/html5/master/class.ws.html5.compiler.php @@ -2153,7 +2153,7 @@ height="0" width="0" style="display:none;visibility:hidden"> continue; } $link = wsHTML5Link::getInstance($this->base62($i), $linkData, $this); - if (is_null($link)) { + if (is_null($link) || $link->ignore()) { continue; } 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 2aed7f2dd..3394519da 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.links.php +++ b/inc/ws/Util/html5/master/class.ws.html5.links.php @@ -291,6 +291,11 @@ class wsHTML5Link return dechex(rand(0, pow(16, 10))); } + public function ignore() + { + return false; + } + public function getSurface() { return $this->width * $this->height; @@ -480,6 +485,16 @@ class wsHTML5Link $this->init(); } + public function isOutsidePage() + { + if ($this->top > $this->compiler->height) { + return true; + } + if ($this->left > $this->compiler->width) { + return true; + } + } + /** * @param int $initialOrder */ @@ -2690,6 +2705,11 @@ class zoomLink extends normalLink protected $maxzoom_default = 2; protected $_groups = null; + public function ignore() + { + return parent::ignore() || $this->isOutsidePage(); + } + public function getGroups() { if (null === $this->_groups) {