Jump to content


minimumMovement doesn't work

Go to solution Solved by Carl,

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

Hi, guys!

I have a problem with minimumMovement parameter in Draggable.

There is a site menu with several clickable links. I want to be able to drag the entire menu even if mouse cursor (or touch) is above the <a> element. But now I can drag it only if I press on empty area of the menu.

You can check the actual version right here: http://nordskill.com/dock/argish/index-about-us.html

But you have to squeeze the browser window to "mobile" width to see what I'm talking about.





The DOM structure looks like this:

<menu class="nav">
      <li><a href="#">btn name</a></li>
      <li><a href="#">btn name</a></li>
      <li><a href="#">btn name</a></li>
      <li><a href="#">btn name</a></li>


Draggable.create(".nav", {type:"x", edgeResistance:0.75, throwProps:true, minimumMovement:2, bounds:window});
Link to comment
Share on other sites

  • Solution

Have you tried setting dragClickables:true? 


dragClickables : Boolean - By default, Draggable will ignore clicks on <a>, <input> <select>,<button>, and <textarea> elements (as well as any element that has a data-clickable="true"attribute), allowing the browser's default behavior (like clicking on an input would give it focus and drop the cursor there to begin typing), but if you want Draggable to hijack those clicks and initiate dragging instead, set dragClickables:true.




If it still doesn't work it would help greatly if you could create a reduced CodePen example as explained here:





  • Like 2
Link to comment
Share on other sites

Have you tried setting dragClickables:true? 


No, I havn't. I tried it and now it works!

I should have read full Documentation on Draggable before asking here. I just read features on the Draggable page and didn't move further.

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.