}
}
$res .= ' data-animations="' . htmlspecialchars(json_encode($animations), ENT_QUOTES) . '" ';
+ if($this->_isHiddenFirst($animations)){
+ $res.=' data-animation-hide ';
+ }
return $res;
}
+ protected function _isHiddenFirst($animations)
+ {
+ $hiddenAnimations = ['reveal', 'unmask', 'fadein', 'translatefrom'];
+ foreach ($animations as $animation) {
+ if(in_array($animation['type'],$hiddenAnimations)){
+ return true;
+ }
+ }
+ return false;
+ }
+
public function getCSSZIndex()
{
if ($this->zindex === 0) {