]> _ Git - fluidbook-html5.git/commitdiff
wait #5464 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 16 Sep 2022 14:33:55 +0000 (16:33 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 16 Sep 2022 14:33:55 +0000 (16:33 +0200)
js/libs/fluidbook/fluidbook.links.js

index abefe144ac9664577b1e0e40162a3145fab0e57e..5da91cc43ddd6b5ceb3858a27cddb60622d1b010 100644 (file)
@@ -665,13 +665,7 @@ FluidbookLinks.prototype = {
         }
         var defaultParams = {};
         var globalDefault = {
-            x: 0,
-            y: 0,
-            yoyo: 0,
-            repeatdelay: 0,
-            repeat: 0,
-            transformorigin: '50% 50%',
-            preventflickering: 0
+            x: 0, y: 0, yoyo: 0, repeatdelay: 0, repeat: 0, transformorigin: '50% 50%', preventflickering: 0
         };
 
         if ($(linkElement).hasClass('textLink')) {
@@ -744,6 +738,18 @@ FluidbookLinks.prototype = {
             from.scale = 1;
             to.scale = animation.scale;
             from.transformOrigin = to.transformOrigin = animation.transformorigin;
+        } else if (animation.type === 'rotate') {
+            to.display = 'block';
+            to.visibility = 'visible';
+            from.rotation = 0;
+            to.rotation = animation.rotation;
+            from.transformOrigin = to.transformOrigin = animation.transformorigin;
+        } else if (animation.type === 'rotatefrom') {
+            to.display = 'block';
+            to.visibility = 'visible';
+            to.rotation = 0;
+            from.rotation = animation.rotation;
+            from.transformOrigin = to.transformOrigin = animation.transformorigin;
         } else if (animation.type === 'translatefrom') {
             from.display = 'none';
             to.display = 'block';