Jump to content
Search Community

Can't get velocity onDrag properly, have an error

AsKadir test
Moderator Tag

Go to solution Solved by GreenSock,

Recommended Posts

  • Solution

That's just because the track() method returns an Array of trackers (because you might pass selector text as the target, for example, so there could be a bunch of trackers - one for each element). In your case, it should be as simple as: 

// BAD
let tracker = InertiaPlugin.track(holder, "x");

// GOOD
let tracker = InertiaPlugin.track(holder, "x")[0];

 

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

  • 4 weeks later...

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...