Jump to content
Search Community

Brian Salazar

Members
  • Posts

    3
  • Joined

  • Last visited

Brian Salazar's Achievements

0

Reputation

  1. Hi guys I was wondering if there is a way to handle same executing time that setTimeout when we are in another tab? I tried gsap.ticker.lagSmoothing(0); but is faster than setTimeout and the onComplete event does not fire correctly, so I tried TweenLite.ticker.useRAF(false); but I have this error Cannot read property 'useRAF' of undefined, so just need one of two things, that onComplete event works correctly without pause the animation when the user change to another tab or that the animation works in the same way that the setTimeout
  2. Hi guys Im having a issue with onUpdate function in one animation, as the title says onUpdate doesn't fire when we are in another tab, this is some of my code: mainProgressAnimation = gsap.fromTo(mainLoadingCircle, { drawSVG: '0%', visibility: 'visible', }, { drawSVG: '100%', ease: 'none', duration: totalDuration, onUpdate: __searchingProgressHandler, }); function __searchingProgressHandler() { if (mainProgressAnimation) { actualProgress = mainProgressAnimation.progress() * 100; } var roundActualProgess = Math.round(actualProgress); $('.js-progress-percentage').html(roundActualProgess+"%"); if (roundActualProgess >= actualStartPoint && roundActualProgess < 100) { gsap.fromTo([secondaryLoadingCircle, secondaryLoadingCircleMobile], { drawSVG: '0%', visibility: 'visible', }, { drawSVG: '100%', ease: 'none', duration: duration, }); } } I remove some part of the code but basically in the update I have a function to display in the html the current progress(Im using a circular loading bar), also I have other small loadings that I need to start when the progress is like 20% Im checking that in the same update function but when I go to another tab the onUpdate function doesn't fire, Im using gsap.ticker.lagSmoothing(0);
×
×
  • Create New...