haltu / muuri

Infinite responsive, sortable, filterable and draggable layouts
https://muuri.dev
MIT License
10.77k stars 644 forks source link

how stop drag when target grid equal example ? #505

Open hamedhmb opened 2 years ago

hamedhmb commented 2 years ago

I want the item to return to its previous position when the item being dragged on the example grid?

niklasramo commented 1 year ago

When do you exactly want the item to return to it's previous position? One way that comes to mind in general is to keep track of the previous order of items and using sort method to put the items in the previous positions whenever you need that to happen.