]> _ Git - fluidbook_tools.git/commitdiff
try #6148 @0.75
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 19 Jul 2023 17:24:54 +0000 (19:24 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 19 Jul 2023 17:24:54 +0000 (19:24 +0200)
src/Links/ContentLink.php
src/Links/LayerLink.php
src/Links/ZoomLink.php

index 9eb313e38ded4aab53f5fe826af5d47ff1cf2efb..de9b6a16197d9aa8fadef43b684e053c989d617d 100644 (file)
@@ -17,6 +17,9 @@ class ContentLink extends Link {
         if ($this->allowsAnimation) {
             $animations = self::parseAnimations($this->image_rollover ?? 'none');
             foreach ($animations as $animation) {
+                if (isset($animation['quality']) && property_exists($this, 'maxzoom_default')) {
+                    $this->maxzoom_default = $animation['quality'];
+                }
                 if (isset($animation['blendmode'])) {
                     $this->blendmode = $animation['blendmode'];
                     unset($animation['blendmode']);
index 73e86a4af79bd4d4a2e30365f2b1dab54c88c2dd..68a5ea65c423276a57ec87df682ce071f345758d 100644 (file)
@@ -51,10 +51,6 @@ class LayerLink extends ImageLink {
         return $this->to ?: 'both';
     }
 
-    public function getDepth() {
-        return parent::getDepth(); // TODO: Change the autogenerated stub
-    }
-
     public function getZoomAttributes() {
         $layer = $this->_getLayer();
         return [
index caff860a2350078ccc541ffde2a36663ac97b0e5..a2bd4eb0057c6f9f0dbf555d7990ba37e6f64e9a 100644 (file)
@@ -99,7 +99,7 @@ class ZoomLink extends NormalLink {
     public static function generateImage($attributes, $compiler, $cachedir, $save, $trim = false) {
 
         $maxzoom = $attributes['maxzoom']; // Max zoom level might not always be set in the link editor
-        $maxzoom = max(2, min($maxzoom, 20));
+        $maxzoom = max(0, min($maxzoom, 20));
         if (!$maxzoom) {
             $maxzoom = 2;
         }