Jump to content
Search Community

Quick To with stagger gives error

Miguel Neves test
Moderator Tag

Go to solution Solved by GreenSock,

Recommended Posts

Hi,

 

I was trying to make an effect on the cursor so I tried using quickTo as recommended but when I addedstagger: 0.01 it stopped working giving me the following error: "Cannot read properties of undefined (reading 'x')".

 

I managed to make the effect with the normal .to

 

Is stagger not compatible with quickTo?

 

Thank you,

Miguel Neves

See the Pen OJrGOEr by mpn7 (@mpn7) on CodePen

Link to comment
Share on other sites

  • Solution

Yes, that's correct - gsap.quickTo() is a highly-optimized option that skips various features and conveniences in order to get maximum speed. Staggering is one of the things omitted. 

 

You might want to consider using Observer to get the event debouncing and be sure to set overwrite: "auto", and also set position: fixed for your elements if you're using .clientX/Y, otherwise it'll break when you scroll the page: 

See the Pen NWemEVQ by GreenSock (@GreenSock) on CodePen

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