-
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
add resize_widget_dimensions() to change widget dimensions after gridster initialization #336
base: master
Are you sure you want to change the base?
add resize_widget_dimensions() to change widget dimensions after gridster initialization #336
Conversation
resize widgets after initialization
+1 |
Exactly what we needed. |
Found one potential issue. After the grid has been render to the DOM and is showing on the web page, I am listening for when the browser window is resized. If I set the max_cols value (in my case 2), and don't set autogrow_cols to true when all the widgets are moved to the first column, you can't move them back to the second column. Other than that everything else has been working great. |
remove min-width and min-height after stopping resize
👍 |
Nice feature! |
$body won't receive mouseup if the cursor is outside the browser window, $document does
when the scrollX/Y is changed during drag (e.g. by the mousewheel) the offset wasn't correct
window.scrollX/Y is only available in Chrome, not in IE
Useful to use them when we there is no gridster instance, like sorting a previously stored output from the serialize method.
Useful when using `positionschanged` event, fired before gridster instance is cached.
resize widgets after initialization Conflicts: src/jquery.gridster.js
remove min-width and min-height after stopping resize
…r/gridster.js into resize-widget-dimensions Conflicts: src/jquery.gridster.js
+1 !! |
👍 |
Any chances to have this pulled? |
Can this pull request be merged please ? |
+1 |
Someone needs to get this merged! Its awesome!! |
Looks great I merged it into my fork dsmorse/gridster.js |
It's awesome!!, Thank U very much!!!!!! +100!!! |
(this is a updated version of my first pull-request - now in a separate branch)
(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:
It's very useful to resize the dashboard when the browser window is resized.