kdietrich/gridstack-angular

Widgets positions not updated while removing

Winnilis opened this issue · 3 comments

Hi,

Thanks for the angular version. Why isn't the position of every widget updated when one of them is removed ?
On the demo, if you add 2 widgets under those which exist
capture1

and then remove the 2 first one, grid height is well updated but widgets stay where they are
capture2

and I need to drag them manually or to add a new widget to force their new position.

Is there a way to force the update ?
Thanks.

I solved this by modifying the "destroy" function to call Gridstack's batchUpdate() and commit() methods before and after removing the item, respectively.

This is a bug that got introduced in gridstack.js v0.2.5. We're going to fix it there. See gridstack/gridstack.js#411 for more info.

Fixed!