]> _ Git - fluidbook_tools.git/commitdiff
wip #7913 @0:30
authorsoufiane <soufiane@cubedesigners.com>
Mon, 23 Feb 2026 10:08:06 +0000 (11:08 +0100)
committersoufiane <soufiane@cubedesigners.com>
Mon, 23 Feb 2026 10:08:06 +0000 (11:08 +0100)
src/Links/AltTextImageLink.php
src/Links/Link.php

index b0948060c5f71503b7b17921216f44ef53d823c0..e5509ddfe9978e86982ce9df726306733bdc0fbf 100644 (file)
@@ -7,22 +7,27 @@ class AltTextImageLink extends Link {
 
     public function getAdditionnalContent() : string {
         $res = parent::getAdditionnalContent();
+
         $res .= ' data-text="' . htmlspecialchars($this->to, ENT_QUOTES) . '" ';
+        $res .= ' data-icon-x="' . $this->icon_x . '" data-icon-y="' . $this->icon_y . '"';
+
         return $res;
     }
 
     public function getInnerContent() : string {
+        $attrs = $this->getTooltipAttribute($this->to);
+        return '<div class="image"></div><div class="infos" ' . $attrs . '></div>';
+    }
+
+    public function getHTMLContent() : string
+    {
         $class = $this->getClasses();
         $attrs = '';
+
         if (count($class)) {
             $attrs .= ' class="' . implode(' ', $class) . '"';
         }
-        $attrs .= $this->getTooltipAttribute($this->to);
-        return '<a href="#" data-type="' . $this->type . '"' . $attrs . $this->getAdditionnalContent() . '></a>';
-    }
 
-    public function getHTMLContent() : string
-    {
-        return '<div class="image"></div>'.$this->getInnerContent();
+        return '<a href="#" data-type="' . $this->type . '"' . $attrs . $this->getAdditionnalContent() . '>' . $this->getInnerContent() . '</a>';
     }
 }
index 4b336ca6dddf9ebdb592916fa5aac6c490a7f3c1..ded1f5a8f4d360649821cd55f2271c6af91c758e 100644 (file)
@@ -178,6 +178,10 @@ class Link
 
     public $attachLeft = false;
 
+    public $icon_x = 100;
+
+    public $icon_y = 100;
+
     protected static $_encryptedTypes = [14, 15, 35, 39];
     protected static $_encryptedAttributes = ['image_rollover'];