Jump to content
Search Community

How to fix this bug? What cause it?

therddlr test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

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

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

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.
×
×
  • Create New...