ducksboard / gridster.js

gridster.js is a jQuery plugin that makes building intuitive draggable layouts from elements spanning multiple columns
http://gridster.net/
MIT License
6.04k stars 1.2k forks source link

serialize_changed returned array not modified in remove_widget callback #566

Closed UdgeMe closed 7 years ago

UdgeMe commented 8 years ago

Hello, When I call remove_widget on a widget, if, as a consequence, other widgets move, I want to save the new positions of these other widgets.

But the array returned by serialize_changed() doesn't contain the new positions when remove_widget callback is called, they are inserted in the array afterwards. So I can't save the others widgets new position just after the remove_widget call, unless I use a setTimeout or similar method after the remove_widget.

Is it a bug ? Is there an "on change" or "on remove" event I can use (I didn't find such a thing in the docs...) ?

Thanks in advance