metafizzy / packery

:bento: Gapless, draggable grid layouts
https://packery.metafizzy.co
4.13k stars 315 forks source link

Draggable with custom (user inputted) elements #563

Closed jwamsterdam closed 1 year ago

jwamsterdam commented 1 year ago

Hi, Just a question...

I would like to have users add elements with sizes defined by them to the grid, and let them be able to drag them in the grid in the most efficient way. I have tried appending elements to the grid (which works), though since I have custom sizes, I provide the element site via the style tag of the element, and not via classes.

I think the style attributes are overwritten with appending and redrawing the grid. Is there any other way to provide element sizes besides classes?

Thanks a lot, Jan Willem

jwamsterdam commented 1 year ago

My mistake, worked already.