From: Vincent Vanwaelscappel Date: Thu, 21 Mar 2019 18:19:36 +0000 (+0100) Subject: wait #2643 @0.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=17cb2b042419d2912d3a98c0bc7dacd3c529bea1;p=fluidbook-html5.git wait #2643 @0.5 --- diff --git a/js/libs/fluidbook/fluidbook.links.js b/js/libs/fluidbook/fluidbook.links.js index 3e0e6b40..88dd01e4 100644 --- a/js/libs/fluidbook/fluidbook.links.js +++ b/js/libs/fluidbook/fluidbook.links.js @@ -220,6 +220,8 @@ FluidbookLinks.prototype = { }, initAnimatedContentsLinks: function () { + var fluidbook = this.fluidbook; + var pauseNetworkDelay = 0; $(".contentLink[data-animation]").each(function () { var animation = $(this).data('animation'); if (animation.type === undefined || animation.type === '') { @@ -355,7 +357,11 @@ FluidbookLinks.prototype = { animation.decimalDigitNumber = parseInt(animation.decimalDigitNumber); animation.letterSpacing = parseFloat(animation.letterSpacing); + var ea = to.ease.split('.'); + var ease = window[ea[0]][ea[1]]; + var options = { + duration: duration, useEasing: true, useGrouping: true, separator: animation.separator, @@ -364,8 +370,7 @@ FluidbookLinks.prototype = { prefix: animation.prefix, suffix: animation.suffix, easingFn: function (t, b, c, d) { - var ea = to.ease.split('.'); - return b + window[ea[0]][ea[1]].getRatio(t / d) * c + return b + ease.getRatio(t / d) * c } }; @@ -385,12 +390,14 @@ FluidbookLinks.prototype = { countup.start(); }, to.delay * 1000); } - + pauseNetworkDelay = Math.max(pauseNetworkDelay, to.delay + duration); $(this).show(); if (tweenmax) { TweenMax.fromTo($(this), duration, from, to); } }); + + this.fluidbook.pauseNetwork((pauseNetworkDelay + 1) * 1000) }, getLinkDataById: function (uid) {