vpusher / the-grid

Grid layout custom element with drag and drop capabilities
https://www.webcomponents.org/element/vpusher/the-grid
MIT License
129 stars 31 forks source link

Save the state of the grid #19

Closed mohanzeal closed 6 years ago

mohanzeal commented 7 years ago

Could you please explain how can we save the state of the grid layout once the elements are moved and also are nesting the grid elements allowed?

vpusher commented 7 years ago

We probably need some serialization() method here, that would extract the each attribute of the tiles and return them as JSON. If I happen to find some time, I will think about it but feel free to PR for a quick solution 😜

syu93 commented 7 years ago

You can listen for the both event emited by each tile on move and resize and serialize the new positions from the tile object contained in the detail of the event

vpusher commented 6 years ago

@mohanzeal delivered in v1.4.0