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

Skip to content

Commit da3ab07

Browse files
author
d
committed
Merge branch 'master' into bugfix/amd-jquery-ui
2 parents 203cc88 + 108d699 commit da3ab07

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,14 +118,14 @@ $(function () {
118118
- `animate` - turns animation on (default: `false`)
119119
- `auto` - if `false` it tells to do not initialize existing items (default: `true`)
120120
- `cell_height` - one cell height (default: `60`)
121-
- `draggable` - allows to owerride jQuery UI draggable options. (default: `{handle: '.grid-stack-item-content', scroll: true, appendTo: 'body'}`)
121+
- `draggable` - allows to override jQuery UI draggable options. (default: `{handle: '.grid-stack-item-content', scroll: true, appendTo: 'body'}`)
122122
- `handle` - draggable handle selector (default: `'.grid-stack-item-content'`)
123123
- `height` - maximum rows amount. Default is `0` which means no maximum rows
124124
- `float` - enable floating widgets (default: `false`) See [example](http://troolee.github.io/gridstack.js/demo/float.html)
125125
- `item_class` - widget class (default: `'grid-stack-item'`)
126126
- `min_width` - minimal width. If window width is less grid will be shown in one-column mode (default: `768`)
127127
- `placeholder_class` - class for placeholder (default: `'grid-stack-placeholder'`)
128-
- `resizable` - allows to owerride jQuery UI resizable options. (default: `{autoHide: true, handles: 'se'}`)
128+
- `resizable` - allows to override jQuery UI resizable options. (default: `{autoHide: true, handles: 'se'}`)
129129
- `vertical_margin` - vertical gap size (default: `20`)
130130
- `width` - amount of columns (default: `12`)
131131

src/gridstack.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@
550550
};
551551

552552
GridStack.prototype._is_one_column_mode = function () {
553-
return $(window).width() <= this.opts.min_width;
553+
return (window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth) <= this.opts.min_width;
554554
};
555555

556556
GridStack.prototype._prepare_element = function (el) {

0 commit comments

Comments
 (0)