]> _ Git - fluidbook_tools.git/commitdiff
wait #6076 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 26 Jun 2023 15:54:48 +0000 (17:54 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 26 Jun 2023 15:54:48 +0000 (17:54 +0200)
src/Links/LayerLink.php
src/Links/ZoomLink.php

index cf9ad8f9a5e9250ff6ca79df6fc904ca704818a2..7f203c58968f6740aa3a3c5e36c67c35fe00262e 100644 (file)
@@ -27,7 +27,7 @@ class LayerLink extends ImageLink {
     }
 
     protected function _getExtension() {
-        if ($this->_getLayer() === 'text') {
+        if ($this->_getLayer() === 'text' || $this->_getLayer() === 'onlytext') {
             return 'svg';
         } else {
             return 'jpg';
index 90a28800b4095996f8a3096fcf48e0e6db00f375..d97ca9f992693b27a61c06d12b3ff4fd90254edd 100644 (file)
@@ -113,7 +113,7 @@ class ZoomLink extends NormalLink {
             $extractOptions['quality'] = $attributes['quality'];
         }
 
-        if (isset($attributes['layer']) && !in_array($attributes['layer'], ['image', 'text'])) {
+        if (isset($attributes['layer']) && !in_array($attributes['layer'], ['image', 'text', 'onlytext'])) {
             unset($attributes['layer']);
         }
 
@@ -144,7 +144,7 @@ class ZoomLink extends NormalLink {
             if ($attributes['layer'] === 'image') {
                 $extractOptions['texts'] = false;
                 $extractOptions['background'] = true;
-            } else if ($attributes['layer'] === 'text') {
+            } else if ($attributes['layer'] === 'text' || $attributes['layer'] === 'onlytext') {
                 $extractOptions['texts'] = true;
                 $extractOptions['background'] = false;
                 $ext = $extractOptions['format'] = 'svg';