Skip to content
This repository has been archived by the owner on Feb 12, 2021. It is now read-only.

Widgets positions not updated while removing #13

Closed
Winnilis opened this issue Jun 16, 2016 · 3 comments
Closed

Widgets positions not updated while removing #13

Winnilis opened this issue Jun 16, 2016 · 3 comments
Labels

Comments

@Winnilis
Copy link

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.

@ghost
Copy link

ghost commented Jul 21, 2016

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

@kdietrich
Copy link
Owner

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.

@kdietrich
Copy link
Owner

Fixed!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants