haltu / muuri

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

[Question] is it possible to lock an item in place while other items drag? #524

Closed planetlucid closed 1 year ago

planetlucid commented 2 years ago

[Question] is it possible to lock an item in place while other items drag around it?

ruudvh commented 2 years ago

I think this is a duplicate of #205. See @niklasramo answer here: #205 (comment).

Hmmm.. If by locked you mean item that can't be dragged or sorted then this is how you'd do it: https://codepen.io/niklasramo/pen/EEdmJr If you want the item to be in fixed position at all times then you can build a custom layout algorithm. Originally posted by @niklasramo in https://github.com/haltu/muuri/issues/205#issuecomment-417049799

niklasramo commented 1 year ago

Yep, this seems to be a duplicate of #205.