From: Vincent Vanwaelscappel Date: Fri, 15 Sep 2023 16:06:39 +0000 (+0200) Subject: wait #6285 @0.75 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=f2339a526d04cef0316fc72f34ec20dc25070764;p=fluidbook_tools.git wait #6285 @0.75 --- diff --git a/src/Links/HTMLMultimediaLink.php b/src/Links/HTMLMultimediaLink.php index 94d7547..1f0f342 100644 --- a/src/Links/HTMLMultimediaLink.php +++ b/src/Links/HTMLMultimediaLink.php @@ -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) { diff --git a/src/Links/Link.php b/src/Links/Link.php index c90914c..162ced1 100644 --- a/src/Links/Link.php +++ b/src/Links/Link.php @@ -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()