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

index ea054ebd2a58d30bfc7b414cfe96ad92c0cbd873..fecd25a8e208605df973cbef6813056e62bf668e 100644 (file)
@@ -665,6 +665,10 @@ FluidbookLinks.prototype = {
         }
         var defaultParams = {};
         var globalDefault = {x: 0, y: 0, yoyo: 0, repeatdelay: 0, repeat: 0, transformorigin: '50% 50%'};
+        console.log(linkElement);
+        if ($(linkElement).hasClass('textLink')) {
+            globalDefault.transformorigin = '0 100%';
+        }
         var w = parseFloat(link.css('width'));
         var cx = w / 2;
         var h = parseFloat(link.css('height'));
@@ -677,7 +681,6 @@ FluidbookLinks.prototype = {
 
         animation = $.extend({}, globalDefault, defaultParams, animation);
 
-
         if (animation.duration !== undefined) {
             duration = parseFloat(animation.duration);
         }
@@ -695,10 +698,9 @@ FluidbookLinks.prototype = {
         }
         if (animation.scale && ['scale', 'scalefrom', 'zoomin', 'zoomout'].indexOf(animation.type) === -1) {
             css.transform = 'scale(' + animation.scale + ')';
-        }
-        if (animation.scale && ['scale', 'scalefrom', 'zoomin', 'zoomout'].indexOf(animation.type) === -1) {
             css.transformOrigin = animation.transformorigin;
         }
+
         if (animation.letterspacing) {
             css.letterspacing = parseFloat(animation.letterspacing);
         }