Jump to content


Using Draggable to interact with canvas image sequence

Recommended Posts



I have create an image sequence that users interact with using Draggable. The sequence is supposed to 'snap' to certain frames and I've written a function to do that. The problem I've encountered is that the cursor position is no longer accurate after the 'snap' occurs. If a user clicks and drags the image sequence and releases the click, the image sequence moves through the appropriate images to the destination slide. When the user then clicks and drags again, the image sequence 'jumps' to a slide number of slides away - which isn't smooth.


I'm wondering if I've missed some way of resetting a cursor position variable, or if i even need to do this in this manner. Any suggestions or pointers are welcome, thanks.

See the Pen poaYLXR by Romainaa (@Romainaa) on CodePen

Link to comment
Share on other sites

Hi @Roman_Overhaul. Welcome to the forums. 


Your demo is pretty unusable as it looks like you're trying to load an image that requires authentication (so it won't load).  You're also loading a SUPER old version of GSAP/TweenMax as well as a newer one (don't do that). You're using the very old syntax too - there's no more need for TweenLite, TweenMax, TimelineLite, or TimelineMax - they're all consolidated into a convenient "gsap" object. Smaller, easier, and even more features. See



We're happy to answer any GSAP-specific questions here but please read the forum guidelines - it looks like you're asking for help with some large chunks of custom logic rather than asking a GSAP-specific question. Unfortunately we just don't have the resources to provide free general consulting services for custom logic. You are welcome to post in the Jobs & Freelance forum to see if you can find someone that offers paid assistance, or contact us directly and we can discuss pricing. 


Good luck with the project! It looks like you do some pretty cool work there. 👍

Link to comment
Share on other sites

Thanks for the response and the pointers. I apologize for the missing assets, I was sure i'd taken care of that.


I appreciate the information and will more closely read the guidelines in order to use these forums for what they're intended for,


Thanks again,

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