From: stephen@cubedesigners.com Date: Thu, 30 Aug 2018 13:00:20 +0000 (+0000) Subject: WIP #2087 @0.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=63d471b7955629c5766cef969b5dea82a25445ea;p=cubeextranet.git WIP #2087 @0.5 --- diff --git a/inc/ws/Util/html5/zoom-groups/class.ws.html5.links.php b/inc/ws/Util/html5/zoom-groups/class.ws.html5.links.php index df4ceb325..69a477cc0 100644 --- a/inc/ws/Util/html5/zoom-groups/class.ws.html5.links.php +++ b/inc/ws/Util/html5/zoom-groups/class.ws.html5.links.php @@ -1446,6 +1446,7 @@ class haguenauManifLink extends internalLink class zoomLink extends normalLink { + protected $maxzoom_default = 2; public function getHTMLContainerClass() { @@ -1470,7 +1471,7 @@ class zoomLink extends normalLink // Data attributes $attributes = [ - 'maxzoom' => empty($this->to) ? 3 : $this->to, + 'maxzoom' => empty($this->to) ? $this->maxzoom_default : $this->to, 'group' => $this->group, 'group-count' => empty($this->group) ? 0 : count(explode(',', $this->group)), 'width' => round($this->width), @@ -1492,7 +1493,7 @@ class zoomLink extends normalLink public function generateImage() { - $maxzoom = ((int)$this->to !== 0) ? $this->to : 2; // Max zoom level might not always be set in the link editor + $maxzoom = ((int)$this->to !== 0) ? $this->to : $this->maxzoom_default; // Max zoom level might not always be set in the link editor $maxzoom = min($maxzoom, 4.166666667); // TODO: Consider generating higher-res images (eg. 2x) for HiDPI screens. Maybe some extra optimisations can be done on the larger images...