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) {
$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 .= '}';