]> _ Git - cubeextranet.git/commitdiff
wip #3852 @0.5
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Tue, 25 Aug 2020 13:44:28 +0000 (13:44 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Tue, 25 Aug 2020 13:44:28 +0000 (13:44 +0000)
inc/ws/Util/html5/master/class.ws.html5.links.php

index 0bd1108951362623afc87f862c638c020e451713..bea98c7966633d42888d917512e733f920df7214 100644 (file)
@@ -793,10 +793,24 @@ class contentLink extends wsHTML5Link
             }
         }
         $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) {