]> _ Git - fluidbook_tools.git/commitdiff
wip #6094 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 5 Jul 2023 16:40:22 +0000 (18:40 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 5 Jul 2023 16:40:22 +0000 (18:40 +0200)
src/Links/LayerLink.php

index 8084a642a4271519b896a5daeed034e0a153c1ae..73e86a4af79bd4d4a2e30365f2b1dab54c88c2dd 100644 (file)
@@ -12,6 +12,13 @@ class LayerLink extends ImageLink {
         return parent::ignore() || $this->isOutsidePage();
     }
 
+    public function __construct($id, $init, &$compiler) {
+        if ($init['to'] === 'text' || $init['to'] === 'onlytext') {
+            $this->defaultZIndex++;
+        }
+        parent::__construct($id, $init, $compiler);
+    }
+
     /**
      * @throws \Exception
      */
@@ -44,6 +51,10 @@ 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 [