Thanks to visit codestin.com
Credit goes to github.com

Skip to content

add resize_widget_dimensions to change widget dimensions after gridster initialization #321

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

Closed
wants to merge 1 commit into from

Conversation

hrosenbauer
Copy link
Contributor

(this pull request is based on the discussion of #77 and the code of https://gist.github.com/OwlyCode/6421823 with small changes, so most of the credits go to https://github.com/OwlyCode)

This will add resize_widget_dimensions() to gridster.js which allows to resize the widget dimensions after initialization:

// initialize gridster with 200x200px widgets using a 5px margin
var gridster = $('.gridster ul').gridster({
    widget_base_dimensions: [200, 200],
    widget_margins: [5, 5]
}).data('gridster');

// resize the widgets to 300x300px and 10px margin
gridster.resize_widget_dimensions({
    widget_base_dimensions: [300, 300],
    widget_margins: [10, 10]
});

…er initialization, add_style_tag will remove old style tags
@adamyonk
Copy link

This is super nice! Thanks for taking the time to do this, @rebugger. 👍

@hrosenbauer hrosenbauer closed this Apr 1, 2014
@Munter
Copy link

Munter commented May 26, 2015

Did you accidentally hit the close button instead of the merge button here?

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

Successfully merging this pull request may close these issues.

3 participants