Skip to content
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

Open
claravanstaden opened this issue Dec 20, 2013 · 4 comments
Open

Change Gridster options on runtime #284

claravanstaden opened this issue Dec 20, 2013 · 4 comments

Comments

@claravanstaden
Copy link

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();

@claravanstaden
Copy link
Author

Found it. Issue was related to Destroy/init stylesheet issue #227.

Fixed by adding Gridster.generated_stylesheets = []; to destroy().

@asapach
Copy link

asapach commented Dec 20, 2013

@Clar64, could you please create a pull request?

@ryancharlesking
Copy link

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.

@claravanstaden
Copy link
Author

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.

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

No branches or pull requests

3 participants