Jump to content
GreenSock

born2net

Does anyone have an example of drag and drop with re-order?

Moderator Tag

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

Hello,

Love the drag and drop capabilities.

I was wondering if anyone has an example of re-ordering.

so if an item is dragged and dropped, other items will make room for it, moving away so the dropped item can be inserted into the dropped position? 

 

The closest example I found is:

 

I am basically looking to achieve this:

http://css-tricks.com/draggable-elements-push-others-way/

 

but with GS instead of jQuery UI.

 

Thank you for reading,

 

Sean.

See the Pen brdDt by born2net (@born2net) on CodePen

Link to comment
Share on other sites

Hi and welcome to the GreenSock forums.

 

We do not have a product that specifically handles sorting for you. Draggable's API though has plenty of hooks (like hitTest) that certainly make this possible though.

You might be interested in this discussion here: http://greensock.com/forums/topic/10704-sortable-elements-with-draggable/?p=42726

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