]> _ Git - fluidbook_tools.git/commitdiff
wait #6285 @0.75
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 15 Sep 2023 16:06:39 +0000 (18:06 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 15 Sep 2023 16:06:39 +0000 (18:06 +0200)
src/Links/HTMLMultimediaLink.php
src/Links/Link.php

index 94d754748a986b5793037f7fc07913c2a2dcde8e..1f0f34296ed6fef09c701a10813dbcf74974c53a 100644 (file)
@@ -151,6 +151,8 @@ class HTMLMultimediaLink extends Link
         $css .= 'left:' . $this->left * $this->getCssScale() . 'px;top:' . $this->top * $this->getCssScale() . 'px;';
         $css .= 'width:' . $this->_config['width'] . 'px;height:' . $this->_config['height'] . 'px;';
         $css .= $this->getCSSZIndex();
+        $css .= $this->getCSSTransform();
+        $css .= $this->getCSSClipPath();
         $css .= $this->getCSS();
         $css .= '}';
         if ($this->_externalIframe !== false && $this->in_popup) {
index c90914c56eadc6b24b8d5d1773874366bf1b7d18..162ced144c96fe4fcc1b4ada7b65d8ff20024788 100644 (file)
@@ -699,19 +699,32 @@ class Link
         $css .= 'left:' . round($this->left * $this->getCssScale()) . 'px;top:' . round($this->top * $this->getCssScale()) . 'px;';
         $css .= 'width:' . round($this->width * $this->getCssScale()) . 'px;height:' . round($this->height * $this->getCssScale()) . 'px;';
         $css .= $this->getCSSZIndex();
-        $origin = false;
+        $css .= $this->getCSSTransform();
+        $css .= $this->getCSSClipPath();
+
+        $css .= $this->getCSS();
+        $css .= '}';
+        return $css;
+    }
+
+    public function getCSSTransform()
+    {
+        $css = '';
         if ($this->rot) {
             $css .= CSS::writeCSSUA('transform', 'rotate(' . $this->rot . 'deg)');
-            $origin = true;
         }
         if (isset($this->skewX)) {
             $css .= CSS::writeCSSUA('transform', 'skewX(' . $this->skewX . 'deg)');
-            $origin = true;
         }
         if (isset($this->skew)) {
             $css .= CSS::writeCSSUA('transform', 'skew(' . $this->skew . ')');
-            $origin = true;
         }
+        return $css;
+    }
+
+
+    public function getCSSClipPath()
+    {
         if ($this->polygon) {
             if (!is_array($this->polygon)) {
                 $points = json_decode($this->polygon, true);
@@ -725,13 +738,10 @@ class Link
                     $y = ($p['y'] / $this->height) * 100;
                     $clippath[] = $x . '% ' . $y . '%';
                 }
-                $css .= 'clip-path:polygon(' . implode(',', $clippath) . ');';
+                return 'clip-path:polygon(' . implode(',', $clippath) . ');';
             }
         }
-
-        $css .= $this->getCSS();
-        $css .= '}';
-        return $css;
+        return '';
     }
 
     public function getCSS()