Jump to content
Search Community

Identical _gsTweenID

lateek35 test
Moderator Tag

Go to solution Solved by lateek35,

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,

I'm experiencing a problem when using TweenMax and Backbone.
I currently have a view that set on some tween.

The first time I instantiated it, like

var firstView = new MyView({...})

my object get transformed like this:

  1. _gsTweenID:"t5"
  2. x:-20
  3. y:0

 

 

 

and it works just as wanted, but the problem appears when I create the second instance like this:

var secondView = new MyView({...})

At this point the second view works perfectly but the first one just not tween anymore, I took a look at the object and figured out that they have the same gsTweenID

 

  1. _gsTweenID:"t5"
  2. x:-20
  3. y:0
  4.  

I really have no idea from where the problem comes, so if you have any clue it would be so nice !

Link to comment
Share on other sites

  • Solution

Ok sorry guys for this useless topic, I didn't find the way to delete it.

In fact, I just figured out that attributes are share between instances of the view in backbone so I need to set them in the initialize. That why object get the same gsap ID.

Cheers

  • Like 2
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...