Jump to content
GreenSock

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

onStart() function fires twice on tween

Recommended Posts

Hey guys I have a very weird issue happening. First I was trying to create a CodePen but I can't replicate the issue there.

 

I created a simple code example, so I have a tween on a timeline and I need functionality when the tween starts, the problem is that the onStart() function being trigger twice for some reason. First I thought that my function was being called twice but that is not the case. I did some research and I found similar issues but way back.

Since I don't have a codepen to show, this is the example code that I have

 

nextSlide(){
  console.log('enter function')

  gsap.timeline()
    .to(this.ImageSections[this.currentSection], {
    onStart: ()=>{
      console.log('enter OnStart() Timeline')
    }
  })
}

 

And this is the console log.

So I can see my function is being trigger once, but the onStart() is being called twice for some reason

 

 

Screen Shot 2021-07-20 at 17.01.33.png

Link to comment
Share on other sites

 

Link to comment
Share on other sites

@PointC any update on when can I expect the update? Or is there a workaround I can use for now?

Link to comment
Share on other sites

@hmontelongo, your same question in the other post was already answered - that's what @PointC was referring you to. Yes, 3.7.1 is already out, so just update and you should be good-to-go. 👍

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.

×