]> _ Git - cubeextranet.git/commitdiff
WIP #2087 @0.5
authorstephen@cubedesigners.com <stephen@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 30 Aug 2018 13:00:20 +0000 (13:00 +0000)
committerstephen@cubedesigners.com <stephen@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 30 Aug 2018 13:00:20 +0000 (13:00 +0000)
inc/ws/Util/html5/zoom-groups/class.ws.html5.links.php

index df4ceb325c78df0f0decc6fc8235c630e086cc30..69a477cc02ba0b0d87a7ee82acc3bf5791e1d7fe 100644 (file)
@@ -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...