-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Change Gridster options on runtime #284
Comments
Found it. Issue was related to Destroy/init stylesheet issue #227. Fixed by adding Gridster.generated_stylesheets = []; to destroy(). |
@Clar64, could you please create a pull request? |
It would probably be better to add that clearing of the generated stylesheets to the remove_style_tags function. That function is called in the destroy function anyway, but that way if the function is used on it's own, that cache will be cleared as well. |
I have more issues which I suspect comes from this issue. I have multiple gridster instances. When I destroy an instance, and create it again, the drag stop callback function does not get invoked anymore. |
I'd like to change the Gridster options at runtime, but I run into some issues. Sometimes the options change, other times they don't. The options values are from input fields.
Am I doing something wrong?
gridster.options.widget_margins = [parseInt(margin_size),parseInt(margin_size)]; gridster.options.widget_base_dimensions = [parseInt(widget_size),parseInt(widget_size)];
gridster.generate_grid_and_stylesheet();
The text was updated successfully, but these errors were encountered: