kombai / freewall

Freewall is a cross-browser and responsive jQuery plugin to help you create grid, image and masonry layouts for desktop, mobile, and tablet...
MIT License
1.85k stars 375 forks source link

How do I get the order of elements? #64

Open vincentschroeder opened 10 years ago

vincentschroeder commented 10 years ago

I try to use the script in dragable mode and want to save the new order permanently in the database, how do I get the new order of bricks after reordering it via drag & drop?

Thanks a lot.

kombai commented 10 years ago

I'm sorry we can't get the order of items. Because when you drag & drop it just changes the position of items, it doesn't change the order. Best

vincentschroeder commented 10 years ago

For what is the drag & drop feature useful if you cant save the state? Or is there an other solution to do this?

kombai commented 10 years ago

We can't store the order but we can store the position insted. You can see at this example: https://github.com/kombai/freewall/blob/master/example/fix-position.html

peterfoeng commented 10 years ago

I am just wondering is there any setting to set a particular block to always sit last of the wall? :)

vincentschroeder commented 10 years ago

Now I am using https://github.com/metafizzy/packery . Here you can save the order of the elements from the DOM.

aruizca commented 10 years ago

Thanks @vincentschroeder!!! It is a pity that such a useful feature is not present. I'll give packery a go.

LeroyDoornebal commented 9 years ago

I would also really like this feature. I can't really use packery as it lacks the ability to be responsive as far as I can see.

akprog commented 6 years ago

@LeroyDoornebal disregarding your post is 3 years old packery is responsive, see this example: https://codepen.io/desandro/pen/chisC