]> _ Git - fluidbook-html5.git/commitdiff
wait #3785 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 24 Aug 2020 12:54:32 +0000 (14:54 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 24 Aug 2020 12:54:32 +0000 (14:54 +0200)
js/libs/fluidbook/fluidbook.links.js

index 9718f0211d048901ad89ae9b9742c5bc37002940..b7d656814a489b544118282f27805ac551c7bd00 100644 (file)
@@ -348,8 +348,13 @@ FluidbookLinks.prototype = {
         var animations = link.data('animations');
         var $this = this;
 
-        var defaults = ['ease', 'duration'];
+        var defaults = ['ease', 'duration', 'delay'];
         var firstDefaults = {};
+
+        if (animations.length === 0) {
+            return;
+        }
+
         $.each(defaults, function (k, v) {
             if (animations[0][v] !== undefined) {
                 firstDefaults[v] = animations[0][v];
@@ -385,7 +390,7 @@ FluidbookLinks.prototype = {
         }
         var css = {};
 
-        if (animation.ease == undefined) {
+        if (animation.ease === undefined) {
             animation.ease = "Power1.easeOut";
         }
         to.ease = animation.ease;
@@ -572,6 +577,7 @@ FluidbookLinks.prototype = {
         }
         if (tweenmax) {
             TweenMax.fromTo(linkElement, duration, from, to);
+            console.log('TweenMax.fromTo', duration, from, to);
         }
         this.fluidbook.networkControl.pause((to.delay + duration + 0.5) * 1000);
     },