]> _ Git - fluidbook-html5.git/commitdiff
wait #5322 @1
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 16 Jun 2022 12:55:11 +0000 (14:55 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 16 Jun 2022 12:55:11 +0000 (14:55 +0200)
js/libs/fluidbook/fluidbook.links.js

index ef72ae08c61f54f64b4bc517a2ed303bba25b3aa..70e94df773a53efad3757e3dd65ddb329a3a5d18 100644 (file)
@@ -690,6 +690,15 @@ FluidbookLinks.prototype = {
         if (animation.filter) {
             css.filter = animation.filter;
         }
+        if (animation.align) {
+            css.textAlign = animation.align;
+        }
+        if (animation.scale && ['scale', 'scalefrom', 'zoomin', 'zoomout'].indexOf(animation.type) === -1) {
+            css.transform = 'scale(' + animation.scale + ')';
+        }
+        if (animation.letterspacing) {
+            css.letterspacing = parseFloat(animation.letterspacing);
+        }
 
         animation.ease = this.fixEase(animation.ease);
         if (animation.rotate !== undefined) {
@@ -850,11 +859,9 @@ FluidbookLinks.prototype = {
                 decimalseparator: '.',
                 decimaldigitnumber: '0',
                 separator: ' ',
-                align: 'left',
                 letterspacing: '0',
                 prefix: '',
                 suffix: '',
-                scale: 1,
             };
             animation = $.extend({}, globalDefault, defaultParams, animation);
             animation.startvalue = parseFloat(animation.startvalue.replace(/,/, '.'));
@@ -876,12 +883,7 @@ FluidbookLinks.prototype = {
                 }
             };
 
-            css = {
-                textAlign: animation.align,
-                letterSpacing: animation.letterspacing,
-                opacity: 0,
-                transform: "scale(" + animation.scale + ")",
-            }
+            css['opacity'] = 0;
 
             var value = parseFloat(link.text().replace(/,/, '.'));
             link.text('');