From 1f0fdb7f911ef153bf4069e4879a4fe755943e33 Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Thu, 6 May 2021 18:23:26 +0000 Subject: [PATCH] wait #4460 --- inc/ws/Util/html5/master/class.ws.html5.links.php | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 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 9b5ba33ff..953e62ef0 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.links.php +++ b/inc/ws/Util/html5/master/class.ws.html5.links.php @@ -1496,7 +1496,12 @@ class layerLink extends imageLink if (!$this->rightClone) { zoomLink::generateImage($attributes, $this->compiler, 'layerlink', 'layer'); } - return 'background-image:url(../links/layer_' . $attributes['id'] . '.jpg);background-size:100% 100%;background-repeat:no-repeat;'; + return 'background-image:url(' . $this->getImageUrl() . ');background-size:100% 100%;background-repeat:no-repeat;'; + } + + public function getImageUrl() + { + return '../links/layer_' . $this->uid . '.jpg'; } public function getZoomAttributes() @@ -1565,15 +1570,21 @@ class textLink extends contentLink class imageLink extends contentLink { + public function getImageUrl() + { + return wsHTML5Link::getUniversalLocation($this->to, true); + } + public function getCSS() { $this->copyExternalFile($this->to); - return 'background-image:url(' . wsHTML5Link::getUniversalLocation($this->to, true) . ');background-size:100% 100%;background-repeat:no-repeat;'; + return 'background-image:url(' . $this->getImageUrl() . ');background-size:100% 100%;background-repeat:no-repeat;'; } public function getAdditionnalContent() { $res = parent::getAdditionnalContent(); + $res .= ' data-image="' . $this->getImageUrl() . '"'; $res .= ' data-rollover="' . $this->rollover . '"'; return $res; } -- 2.39.5