gridster.js
gridster.js copied to clipboard
Gridster disable reset on resize.
The state of the drag enable/disable setting seems to get reset whenever resize_responsive_layout() is called. If you disable() gridster, then have the resize layout called it becomes enabled again, causing widgets to be movable again.
Looks like the culprit is https://github.com/dsmorse/gridster.js/blob/7cf095da2c189bae4d7deae4886af4ba0437953e/src/jquery.gridster.js#L3815
in generate_stylesheet. The toggle_collapsed_grid method explicitly sets enabled/disabled flags, overwriting what was already set.
I'm going to look into it, because it clearly it's a bug, but I need to check if it resets the flags on the method for an specific reason or it was an oversight.
While I'm checking the issue, please, let me know how are you provisioning the library, are you downloading the source? are you using npm? I'm curious about how are we distributing... thanks!
We're loading from https://www.jsdelivr.com/package/npm/dsmorse-gridster, which builds from NPM.
Is this issue going to be resolved? It is easily replicated on browser resize. We recently incorporated gridster into a custom Progress Kendo jQuery widget and encountered the same bug, which for us is a big deal.
Is this issue going to be resolved? It is easily replicated on browser resize. We recently incorporated gridster into a custom Progress Kendo jQuery widget and encountered the same bug, which for us is a big deal.
What I ended up doing was binding a callback to the window resize event that re-disables gridster if it's supposed to be disabled. Not sure if that'll work for your scenario, but it was an acceptable workaround for us.
@kalzekdor hello , I've been using it recently.Can you leave a contact to communicate? thank you
I also hit this issue, the window resize callback solution works, but it hope it core problem can be fixed soon.