Jump to content

Search In
  • More options...
Find results that contain...
Find results in...

How to fix this bug? What cause it?

Recommended Posts

Hello, guys! 


Recently started to use GSAP in my apps, and I can't stop enjoying it. Still exploring it, so time to time have some issues. Like this.


If you click logo FAST multiple times then it's broken! 


See the Pen bQPXRB by dubdub (@dubdub) on CodePen


Looks like GSAP doesn't clean up transitions, if new animation happens before previous completed? How do I handle situations like this? 

See the Pen bQPXRB by dubdub (@dubdub) on CodePen

Link to comment
Share on other sites

I updated the link, for some reason it was broken by forum formatting.

Link to comment
Share on other sites

It's not a bug. That's what happens when you interrupt a from animation. If the scale is at 0.1 when you interrupt the animation, it's going to animate the scale from 0 to 0.1.


Try this.


// You can set this when mounted
TweenLite.set(".es-bubble", {
  transformOrigin: 'bottom bottom',
TweenMax.staggerFromTo('.es-bubble', 1, {
  scale: 0,
  opacity: 0,
}, {
  scale: 1,
  opacity: 1,        
  ease: Elastic.easeOut,
 // force3D: true // doesn't work on SVG
}, 0.1)


  • Like 8
Link to comment
Share on other sites

@OSUblake that's perfect! Thank you very much!


After Anime.js, where I needed to clean up manually situations like this, this feels like a breath of fresh air ?


I guess I need to rephrase title? I meant a bug in my application code, not really GSAP 

  • Like 4
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.