]> _ Git - fluidbook_tools.git/commitdiff
wip #7650 @1
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 21 Jul 2025 16:27:02 +0000 (18:27 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 21 Jul 2025 16:27:02 +0000 (18:27 +0200)
src/Links/Link.php
src/Links/NormalLink.php

index e7173437d54e3056e9820d963017fdf38c4b470f..8623a9f5ef850c09f934b53e881c72e1a4ef4901 100644 (file)
@@ -850,7 +850,7 @@ class Link
         $css .= $this->getCSSClipPath();
         $css .= $this->getCSS();
         $css .= '}';
-        $css.=$this->getExtraCSS();
+        $css .= $this->getExtraCSS();
         if ($this->cursor) {
             $css .= '#l_' . $this->id . ' a{cursor:' . $this->cursor . ' !important;}';
         }
@@ -897,7 +897,8 @@ class Link
         return '';
     }
 
-    public function getExtraCSS(){
+    public function getExtraCSS()
+    {
         return '';
     }
 
@@ -1158,4 +1159,9 @@ class Link
     {
         return (!$this->animation_type || $this->animation_type === 'default') ? $this->compiler->getSetting('linksAnimation', 'fade') : $this->animation_type;
     }
+
+    public function getDisplayArea()
+    {
+        return $this->animation_type == '1' || $this->display_area === 'default' ? $this->compiler->getSetting('linksDisplayArea', 'fill') : $this->display_area;
+    }
 }
index ad222714684d4c8ab23b1db1077c7c17160ea6b7..b9ee506ae7a9802612325db1198b6bdaeb46eb3c 100644 (file)
@@ -17,9 +17,9 @@ class NormalLink extends Link
         $attrs = '';
         if ($this->compiler->getSetting('linksAnimationLayer', 'top') === 'top') {
             $attrs .= ' data-animation="' . $this->getAnimationType() . '"';
-            $attrs .= ' data-display-area="' . $this->display_area . '" ';
+            $attrs .= ' data-display-area="' . $this->getDisplayArea() . '" ';
         } else {
-            $attrs .= ' data-display-area="none" data-display-area-related=" ' . $this->display_area . '" ';
+            $attrs .= ' data-display-area="none" data-display-area-related=" ' . $this->getDisplayArea() . '" ';
         }
 
         if (count($class)) {
@@ -56,6 +56,8 @@ class NormalLink extends Link
     {
         $animDuration = 0.4;
 
+        $borderRadius = $this->compiler->getSetting('linksRoundedCorners', 0) * 2;
+
         $init = $this->_init;
         $init['type'] = self::COLOR;
         $init['to'] = $color;
@@ -69,7 +71,7 @@ ease=power1.easeOut
 opacity=' . $opacity . '
 duration=' . $animDuration . '
 delay=' . $delay . '
-borderradius=' . ($this->compiler->getSetting('linksRoundedCorners', 0) * 2) . '
+borderradius=' . $borderRadius . '
 ---------------
 type=fadeout
 ease=power1.easeOut
@@ -78,9 +80,10 @@ delay=' . ($delay - 0.5 + $animDuration + $duration);
         } else if ($this->getAnimationType() === 'fade') {
             $init['image_rollover'] = 'type=fadein
 ease=power1.easeOut
+opacity=' . $opacity . '
 duration=' . $animDuration . '
 delay=' . $delay . '
-borderradius=' . ($this->compiler->getSetting('linksRoundedCorners', 0) * 2) . '
+borderradius=' . $borderRadius . '
 ---------------
 type=fadeout
 ease=power1.easeOut
@@ -89,7 +92,7 @@ delay=' . ($delay - 0.5 + $animDuration + $duration);
         } else if ($this->getAnimationType() === 'none') {
             $init['image_rollover'] = 'type=keephidden
 duration=0.5
-borderradius=' . ($this->compiler->getSetting('linksRoundedCorners', 0) * 2);
+borderradius=' . $borderRadius;
         }
 
         return self::getInstance($init['id'], $init, $this->compiler);