]> _ Git - cubeextranet.git/commitdiff
#1032
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Wed, 14 Dec 2016 15:31:11 +0000 (15:31 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Wed, 14 Dec 2016 15:31:11 +0000 (15:31 +0000)
inc/ws/Util/html5/class.ws.html5.links.php

index 521051bbd4a59b94f5ef56466b8c9df916c959cb..c3c9c4333532e93f6320ab5c4b5220c247d4664b 100644 (file)
@@ -147,6 +147,9 @@ class wsHTML5Link {
        public function __construct($id, $init, &$compiler) {
                $this->_init = $init;
                foreach ($init as $k => $v) {
+                       if ($k == 'extra' && CubeIT_Util_Json::isJson($v)) {
+                               $v = CubeIT_Util_Json::decode($v);
+                       }
                        $this->$k = $v;
                }
                if (!$this->video_width) {
@@ -250,9 +253,14 @@ class wsHTML5Link {
                $css = '#l_' . $this->id . '{';
                $css .= 'left:' . $this->left * $this->getCssScale() . 'px;top:' . $this->top * $this->getCssScale() . 'px;';
                $css .= 'width:' . $this->width * $this->getCssScale() . 'px;height:' . $this->height * $this->getCssScale() . 'px;';
+               $origin = false;
                if ($this->rot) {
                        $css .= wsHTML5Compiler::writeCSSUA('transform', 'rotate(' . $this->rot . 'deg)');
-                       $css .= wsHTML5Compiler::writeCSSUA('transform-origin', '0% 0%');
+                       $origin = true;
+               }
+               if (isset($this->extra->skewX)) {
+                       $css .= wsHTML5Compiler::writeCSSUA('transform', 'skewX(' . $this->extra->skewX . 'deg)');
+                       $origin = true;
                }
                $css .= $this->getCSS();
                $css .= '}';