Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
nlivni@gmail.com

Draggable without overlap

Recommended Posts

I was wondering if there is any way to use draggable so that elements are not allowed to overlap with each other.  So that snapping will respect the boundaries of other elements.

Link to comment
Share on other sites

Hi nlivni@gmail.com,

 

Welcome to GreenSock Forums.

 

Please have a look to the post:  

Especially the recommendation of BLAKE  regarding 'hit test'.

 

It  would be great if you could provide a small CopenPen with your example.

 

Best regards

Mikel

  • Like 3
Link to comment
Share on other sites

Hello @nlivni@gmail.com and welcome to the GreenSock Forum!

 

Please checkout the docs on the GSAP hitTest() methods as @mikel advised

 

hitTest() : https://greensock.com/docs/Utilities/Draggable/hitTest()

static hitTest() : https://greensock.com/docs/Utilities/Draggable/static.hitTest()

 

Happy Tweening :)

  • Like 3
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.
×