Jump to content
Search Community

Prevent re-dragging while isThrowing = true

GrandCentral test
Moderator Tag

Recommended Posts

Hi @GrandCentral. Thanks for being a Club GreenSock member! 💚

 

You could just set up event listeners to intercept the events, like: 

document.querySelector("#knob").addEventListener("pointerdown", (e) => {
  if (draggable[0].isThrowing) {
    e.stopImmediatePropagation();
  }
}, {capture: true});

(and you'd probably want to do that for events like touchdown and mousedown to cover all the devices)

 

See the Pen vYQbWMd?editors=0010 by GreenSock (@GreenSock) on CodePen

 

Is that what you were looking for? 

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