-
Notifications
You must be signed in to change notification settings - Fork 382
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose current grid dimension #298
Comments
Hi @macftw , You can use the callbacks If you want to obtain something to set the height/width of the grid some like this #292 If not will add a Thanks |
Thank you @tiberiuzuld for the quick reply. Also the I think a |
Ok will add a |
Added in v5.3.0 |
Hello @tiberiuzuld I tried to use gridSizeChangedCallback, but it has never fired. ... How can I trigged gridSizeChangedCallback when grid size change in this case? |
Is it possible to expose the current with and height of the grid as reflected in the .gridster-column elements? Preferably by an event that fires whenever the grid dimension changes (during drag, deletion, insertion, etc.).
I am currently trying a workaround by watching the gridster-column element with an MutationObserver which seems like a hacky solution (and also doesn't work as expected).
I also tried to check the dimension onDragStop which doesn't quite work either since it fires immediately while the grid is still animating.
I'm thinking of a gridSizeChanged callback in the options which fires whenever rows or columns are added/removed. Or is this already possible and I'm missing something?
Thank you for your help!
The text was updated successfully, but these errors were encountered: