]> _ Git - fluidbook-html5.git/commitdiff
wait #7148 @0:05
authorsoufiane <soufiane@cubedesigners.com>
Tue, 22 Oct 2024 13:55:45 +0000 (15:55 +0200)
committersoufiane <soufiane@cubedesigners.com>
Tue, 22 Oct 2024 13:55:45 +0000 (15:55 +0200)
js/libs/fluidbook/fluidbook.links.animations.js

index 197646dadd5950d772e8c638f76f5cade0ace090..526c820973cca4c78dcf8296e5a1cbd619e0156c 100644 (file)
@@ -216,6 +216,20 @@ FluidbookLinksAnimations.prototype = {
             var left = 0;
 
             var rectinit = 'rect(0px,' + w + 'px,' + h + 'px,0px)';
+
+            /**
+             * Rename animation direction name
+             */
+            if(!animation.direction) {
+                animation.direction = 'right'
+            }
+            if(animation.direction === 'top') {
+                animation.direction = 'up'
+            }
+            if(animation.direction === 'bottom') {
+                animation.direction = 'down'
+            }
+
             if ((animation.direction === 'left' && animation.type === 'unmask') || (animation.direction === 'right' && animation.type === 'reveal')) {
                 right = 0;
             } else if ((animation.direction === 'right' && animation.type === 'unmask') || (animation.direction === 'left' && animation.type === 'reveal')) {