if ($k == 'extra') {
if (CubeIT_Util_Json::isJson($v)) {
$v = CubeIT_Util_Json::decode($v);
- } else if (stristr($v, '=') && stristr($v, '&')) {
+ } else if (strpos($v, '=') !== false && strpos($v, '&') !== false) {
$vv = $v;
$v = [];
parse_str($vv, $v);
$v = CubeIT_Util_Object::asObject($v);
- } else if (stristr($v, '=')) {
+ } else if (strpos($v, '=') !== false) {
$extras = self::parseExtras($v);
foreach ($extras as $extrak => $extrav) {
$this->$extrak = $extrav;
$css .= wsHTML5::writeCSSUA('transform', 'rotate(' . $this->rot . 'deg)');
$origin = true;
}
- if (isset($this->extra->skewX)) {
- $css .= wsHTML5::writeCSSUA('transform', 'skewX(' . $this->extra->skewX . 'deg)');
+ if (isset($this->skewX)) {
+ $css .= wsHTML5::writeCSSUA('transform', 'skewX(' . $this->skewX . 'deg)');
+ $origin = true;
+ }
+ if (isset($this->skew)) {
+ $css .= wsHTML5::writeCSSUA('transform', 'skew(' . $this->skew . ')');
$origin = true;
}
}
}
$res .= ' data-animations="' . htmlspecialchars(json_encode($animations), ENT_QUOTES) . '" ';
- if($this->_isHiddenFirst($animations)){
- $res.=' data-animation-hide ';
+ if ($this->_isHiddenFirst($animations)) {
+ $res .= ' data-animation-hide ';
}
return $res;
{
$hiddenAnimations = ['reveal', 'fadein', 'translatefrom'];
foreach ($animations as $animation) {
- if(in_array($animation['type'],$hiddenAnimations)){
+ if (in_array($animation['type'], $hiddenAnimations)) {
return true;
}
}