diff --git a/README.md b/README.md index 1062634..dd78c01 100644 --- a/README.md +++ b/README.md @@ -31,17 +31,21 @@ Inspired by [gridster.js](http://gridster.net). Built with love. - [cell_height(val)](#cell_heightval) - [cell_width()](#cell_width) - [commit()](#commit) + - [destroy()](#destroy) - [disable()](#disable) - [enable()](#enable) - [get_cell_from_pixel(position)](#get_cell_from_pixelposition) - [is_area_empty(x, y, width, height)](#is_area_emptyx-y-width-height) - [locked(el, val)](#lockedel-val) + - [min_width(el, val)](#min_widthel-val) + - [min_height(el, val)](#min_heightel-val) + - [movable(el, val)](#movableel-val) + - [move(el, x, y)](#moveel-x-y) - [remove_widget(el, detach_node)](#remove_widgetel-detach_node) - [remove_all()](#remove_all) - [resize(el, width, height)](#resizeel-width-height) - - [move(el, x, y)](#moveel-x-y) - [resizable(el, val)](#resizableel-val) - - [movable(el, val)](#movableel-val) + - [set_static(static_value)](#set_staticstatic_value) - [update(el, x, y, width, height)](#updateel-x-y-width-height) - [will_it_fit(x, y, width, height, auto_position)](#will_it_fitx-y-width-height-auto_position) - [Utils](#utils) @@ -49,13 +53,16 @@ Inspired by [gridster.js](http://gridster.net). Built with love. - [Touch devices support](#touch-devices-support) - [Use with knockout.js](#use-with-knockoutjs) - [Change grid width](#change-grid-width) + - [Extra CSS](#extra-css) + - [Different grid widths](#different-grid-widths) - [Save grid to array](#save-grid-to-array) - [Load grid from array](#load-grid-from-array) - [Override resizable/draggable options](#override-resizabledraggable-options) - [IE8 support](#ie8-support) - [Nested grids](#nested-grids) - [Changes](#changes) - - [v0.2.3 (development version)](#v023-development-version) + - [v0.2.4 (development version)](#v024-development-version) + - [v0.2.3 (2015-06-23)](#v023-2015-06-23) - [v0.2.2 (2014-12-23)](#v022-2014-12-23) - [v0.2.1 (2014-12-09)](#v021-2014-12-09) - [v0.2.0 (2014-11-30)](#v020-2014-11-30) @@ -126,6 +133,7 @@ $(function () { - `min_width` - minimal width. If window width is less, grid will be shown in one-column mode (default: `768`) - `placeholder_class` - class for placeholder (default: `'grid-stack-placeholder'`) - `resizable` - allows to override jQuery UI resizable options. (default: `{autoHide: true, handles: 'se'}`) +- `static_grid` - makes grid static (default `false`). If true widgets are not movable/resizable. You don't even need jQueryUI draggable/resizable. A CSS class `grid-stack-static` is also added to the container. - `vertical_margin` - vertical gap size (default: `20`) - `width` - amount of columns (default: `12`) @@ -152,7 +160,7 @@ to completely lock the widget. ### onchange(items) -Occurs when widgets change their position/size +Occurs when adding/removing widgets or existing widgets change their position/size ```javascript var serialize_widget_map = function (items) { @@ -249,6 +257,10 @@ Gets current cell width. Finishes batch updates. Updates DOM nodes. You must call it after `batch_update`. +### destroy() + +Destroys a grid instance. + ### disable() Disables widgets moving/resizing. This is a shortcut for: @@ -288,6 +300,36 @@ Locks/unlocks widget. - `el` - widget to modify. - `val` - if `true` widget will be locked. +### min_width(el, val) + +Set the minWidth for a widget. + +- `el` - widget to modify. +- `val` - A numeric value of the number of columns + +### min_height(el, val) + +Set the minHeight for a widget. + +- `el` - widget to modify. +- `val` - A numeric value of the number of rows + +### movable(el, val) + +Enables/Disables moving. + +- `el` - widget to modify +- `val` - if `true` widget will be draggable. + +### move(el, x, y) + +Changes widget position + +Parameters: + +- `el` - widget to move +- `x`, `y` - new position. If value is `null` or `undefined` it will be ignored. + ### remove_widget(el, detach_node) Removes widget from the grid. @@ -310,15 +352,6 @@ Parameters: - `el` - widget to resize - `width`, `height` - new dimensions. If value is `null` or `undefined` it will be ignored. -### move(el, x, y) - -Changes widget position - -Parameters: - -- `el` - widget to move -- `x`, `y` - new position. If value is `null` or `undefined` it will be ignored. - ### resizable(el, val) Enables/Disables resizing. @@ -326,12 +359,11 @@ Enables/Disables resizing. - `el` - widget to modify - `val` - if `true` widget will be resizable. -### movable(el, val) +### set_static(static_value) -Enables/Disables moving. +Toggle the grid static state. Also toggle the `grid-stack-static` class. -- `el` - widget to modify -- `val` - if `true` widget will be draggable. +- `static_value` - if `true` the grid become static. ### update(el, x, y, width, height) @@ -519,6 +551,25 @@ Here is a SASS code snipped which can make life easier (Thanks to @ascendantofra } ``` +Or you can include `gridstack-extra.css`. See below for more details. + +## Extra CSS + +There are few extra CSS batteries in `gridstack-extra.css` (`gridstack-extra.min.css`). + +### Different grid widths + +You can use other than 12 grid width: + +```html +
...
+``` +```javascript +$('.grid-stack').gridstack({width: N}); +``` + +See example: [2 grids demo](http://troolee.github.io/gridstack.js/demo/two.html) + ## Save grid to array Because gridstack doesn't track any kind of user-defined widget id there is no reason to make serialization to be part @@ -644,8 +695,16 @@ See example: [Nested grid demo](http://troolee.github.io/gridstack.js/demo/neste Changes ======= -#### v0.2.3 (development version) +#### v0.2.4 (development version) +- fix closure compiler/linter warnings +- add `static_grid` option. +- add `min_width`/`min_height` methods (Thanks to @cvillemure) +- add `destroy` method (Thanks to @zspitzer) + +#### v0.2.3 (2015-06-23) + +- gridstack-extra.css - add support of lodash.js - add `is_area_empty` method - nested grids diff --git a/bower.json b/bower.json index 3b786b7..4428d53 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "gridstack", - "version": "0.2.2", + "version": "0.2.3", "homepage": "https://github.com/troolee/gridstack.js", "authors": [ "Pavel Reznikov " diff --git a/demo/serialization.html b/demo/serialization.html index aca9d32..06ddbc6 100644 --- a/demo/serialization.html +++ b/demo/serialization.html @@ -56,6 +56,7 @@ + + + + + + + + +
+

Two grids demo

+ +
+
+
+
+
+
+
+
+
+
+
+ + + + + diff --git a/dist/gridstack-extra.css b/dist/gridstack-extra.css new file mode 100644 index 0000000..2ea5adb --- /dev/null +++ b/dist/gridstack-extra.css @@ -0,0 +1,983 @@ +.grid-stack.grid-stack-1 > .grid-stack-item { + min-width: 100%; +} +.grid-stack.grid-stack-1 > .grid-stack-item[data-gs-width='1'] { + width: 100%; +} +.grid-stack.grid-stack-1 > .grid-stack-item[data-gs-x='1'] { + left: 100%; +} +.grid-stack.grid-stack-1 > .grid-stack-item[data-gs-min-width='1'] { + min-width: 100%; +} +.grid-stack.grid-stack-1 > .grid-stack-item[data-gs-max-width='1'] { + max-width: 100%; +} + +.grid-stack.grid-stack-2 > .grid-stack-item { + min-width: 50%; +} +.grid-stack.grid-stack-2 > .grid-stack-item[data-gs-width='1'] { + width: 50%; +} +.grid-stack.grid-stack-2 > .grid-stack-item[data-gs-x='1'] { + left: 50%; +} +.grid-stack.grid-stack-2 > .grid-stack-item[data-gs-min-width='1'] { + min-width: 50%; +} +.grid-stack.grid-stack-2 > .grid-stack-item[data-gs-max-width='1'] { + max-width: 50%; +} +.grid-stack.grid-stack-2 > .grid-stack-item[data-gs-width='2'] { + width: 100%; +} +.grid-stack.grid-stack-2 > .grid-stack-item[data-gs-x='2'] { + left: 100%; +} +.grid-stack.grid-stack-2 > .grid-stack-item[data-gs-min-width='2'] { + min-width: 100%; +} +.grid-stack.grid-stack-2 > .grid-stack-item[data-gs-max-width='2'] { + max-width: 100%; +} + +.grid-stack.grid-stack-3 > .grid-stack-item { + min-width: 33.33333333%; +} +.grid-stack.grid-stack-3 > .grid-stack-item[data-gs-width='1'] { + width: 33.33333333%; +} +.grid-stack.grid-stack-3 > .grid-stack-item[data-gs-x='1'] { + left: 33.33333333%; +} +.grid-stack.grid-stack-3 > .grid-stack-item[data-gs-min-width='1'] { + min-width: 33.33333333%; +} +.grid-stack.grid-stack-3 > .grid-stack-item[data-gs-max-width='1'] { + max-width: 33.33333333%; +} +.grid-stack.grid-stack-3 > .grid-stack-item[data-gs-width='2'] { + width: 66.66666667%; +} +.grid-stack.grid-stack-3 > .grid-stack-item[data-gs-x='2'] { + left: 66.66666667%; +} +.grid-stack.grid-stack-3 > .grid-stack-item[data-gs-min-width='2'] { + min-width: 66.66666667%; +} +.grid-stack.grid-stack-3 > .grid-stack-item[data-gs-max-width='2'] { + max-width: 66.66666667%; +} +.grid-stack.grid-stack-3 > .grid-stack-item[data-gs-width='3'] { + width: 100%; +} +.grid-stack.grid-stack-3 > .grid-stack-item[data-gs-x='3'] { + left: 100%; +} +.grid-stack.grid-stack-3 > .grid-stack-item[data-gs-min-width='3'] { + min-width: 100%; +} +.grid-stack.grid-stack-3 > .grid-stack-item[data-gs-max-width='3'] { + max-width: 100%; +} + +.grid-stack.grid-stack-4 > .grid-stack-item { + min-width: 25%; +} +.grid-stack.grid-stack-4 > .grid-stack-item[data-gs-width='1'] { + width: 25%; +} +.grid-stack.grid-stack-4 > .grid-stack-item[data-gs-x='1'] { + left: 25%; +} +.grid-stack.grid-stack-4 > .grid-stack-item[data-gs-min-width='1'] { + min-width: 25%; +} +.grid-stack.grid-stack-4 > .grid-stack-item[data-gs-max-width='1'] { + max-width: 25%; +} +.grid-stack.grid-stack-4 > .grid-stack-item[data-gs-width='2'] { + width: 50%; +} +.grid-stack.grid-stack-4 > .grid-stack-item[data-gs-x='2'] { + left: 50%; +} +.grid-stack.grid-stack-4 > .grid-stack-item[data-gs-min-width='2'] { + min-width: 50%; +} +.grid-stack.grid-stack-4 > .grid-stack-item[data-gs-max-width='2'] { + max-width: 50%; +} +.grid-stack.grid-stack-4 > .grid-stack-item[data-gs-width='3'] { + width: 75%; +} +.grid-stack.grid-stack-4 > .grid-stack-item[data-gs-x='3'] { + left: 75%; +} +.grid-stack.grid-stack-4 > .grid-stack-item[data-gs-min-width='3'] { + min-width: 75%; +} +.grid-stack.grid-stack-4 > .grid-stack-item[data-gs-max-width='3'] { + max-width: 75%; +} +.grid-stack.grid-stack-4 > .grid-stack-item[data-gs-width='4'] { + width: 100%; +} +.grid-stack.grid-stack-4 > .grid-stack-item[data-gs-x='4'] { + left: 100%; +} +.grid-stack.grid-stack-4 > .grid-stack-item[data-gs-min-width='4'] { + min-width: 100%; +} +.grid-stack.grid-stack-4 > .grid-stack-item[data-gs-max-width='4'] { + max-width: 100%; +} + +.grid-stack.grid-stack-5 > .grid-stack-item { + min-width: 20%; +} +.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-width='1'] { + width: 20%; +} +.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-x='1'] { + left: 20%; +} +.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-min-width='1'] { + min-width: 20%; +} +.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-max-width='1'] { + max-width: 20%; +} +.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-width='2'] { + width: 40%; +} +.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-x='2'] { + left: 40%; +} +.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-min-width='2'] { + min-width: 40%; +} +.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-max-width='2'] { + max-width: 40%; +} +.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-width='3'] { + width: 60%; +} +.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-x='3'] { + left: 60%; +} +.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-min-width='3'] { + min-width: 60%; +} +.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-max-width='3'] { + max-width: 60%; +} +.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-width='4'] { + width: 80%; +} +.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-x='4'] { + left: 80%; +} +.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-min-width='4'] { + min-width: 80%; +} +.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-max-width='4'] { + max-width: 80%; +} +.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-width='5'] { + width: 100%; +} +.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-x='5'] { + left: 100%; +} +.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-min-width='5'] { + min-width: 100%; +} +.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-max-width='5'] { + max-width: 100%; +} + +.grid-stack.grid-stack-6 > .grid-stack-item { + min-width: 16.66666667%; +} +.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-width='1'] { + width: 16.66666667%; +} +.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-x='1'] { + left: 16.66666667%; +} +.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-min-width='1'] { + min-width: 16.66666667%; +} +.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-max-width='1'] { + max-width: 16.66666667%; +} +.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-width='2'] { + width: 33.33333333%; +} +.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-x='2'] { + left: 33.33333333%; +} +.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-min-width='2'] { + min-width: 33.33333333%; +} +.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-max-width='2'] { + max-width: 33.33333333%; +} +.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-width='3'] { + width: 50%; +} +.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-x='3'] { + left: 50%; +} +.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-min-width='3'] { + min-width: 50%; +} +.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-max-width='3'] { + max-width: 50%; +} +.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-width='4'] { + width: 66.66666667%; +} +.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-x='4'] { + left: 66.66666667%; +} +.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-min-width='4'] { + min-width: 66.66666667%; +} +.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-max-width='4'] { + max-width: 66.66666667%; +} +.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-width='5'] { + width: 83.33333333%; +} +.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-x='5'] { + left: 83.33333333%; +} +.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-min-width='5'] { + min-width: 83.33333333%; +} +.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-max-width='5'] { + max-width: 83.33333333%; +} +.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-width='6'] { + width: 100%; +} +.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-x='6'] { + left: 100%; +} +.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-min-width='6'] { + min-width: 100%; +} +.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-max-width='6'] { + max-width: 100%; +} + +.grid-stack.grid-stack-7 > .grid-stack-item { + min-width: 14.28571429%; +} +.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-width='1'] { + width: 14.28571429%; +} +.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-x='1'] { + left: 14.28571429%; +} +.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-min-width='1'] { + min-width: 14.28571429%; +} +.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-max-width='1'] { + max-width: 14.28571429%; +} +.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-width='2'] { + width: 28.57142857%; +} +.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-x='2'] { + left: 28.57142857%; +} +.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-min-width='2'] { + min-width: 28.57142857%; +} +.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-max-width='2'] { + max-width: 28.57142857%; +} +.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-width='3'] { + width: 42.85714286%; +} +.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-x='3'] { + left: 42.85714286%; +} +.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-min-width='3'] { + min-width: 42.85714286%; +} +.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-max-width='3'] { + max-width: 42.85714286%; +} +.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-width='4'] { + width: 57.14285714%; +} +.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-x='4'] { + left: 57.14285714%; +} +.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-min-width='4'] { + min-width: 57.14285714%; +} +.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-max-width='4'] { + max-width: 57.14285714%; +} +.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-width='5'] { + width: 71.42857143%; +} +.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-x='5'] { + left: 71.42857143%; +} +.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-min-width='5'] { + min-width: 71.42857143%; +} +.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-max-width='5'] { + max-width: 71.42857143%; +} +.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-width='6'] { + width: 85.71428571%; +} +.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-x='6'] { + left: 85.71428571%; +} +.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-min-width='6'] { + min-width: 85.71428571%; +} +.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-max-width='6'] { + max-width: 85.71428571%; +} +.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-width='7'] { + width: 100%; +} +.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-x='7'] { + left: 100%; +} +.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-min-width='7'] { + min-width: 100%; +} +.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-max-width='7'] { + max-width: 100%; +} + +.grid-stack.grid-stack-8 > .grid-stack-item { + min-width: 12.5%; +} +.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-width='1'] { + width: 12.5%; +} +.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-x='1'] { + left: 12.5%; +} +.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-min-width='1'] { + min-width: 12.5%; +} +.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-max-width='1'] { + max-width: 12.5%; +} +.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-width='2'] { + width: 25%; +} +.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-x='2'] { + left: 25%; +} +.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-min-width='2'] { + min-width: 25%; +} +.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-max-width='2'] { + max-width: 25%; +} +.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-width='3'] { + width: 37.5%; +} +.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-x='3'] { + left: 37.5%; +} +.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-min-width='3'] { + min-width: 37.5%; +} +.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-max-width='3'] { + max-width: 37.5%; +} +.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-width='4'] { + width: 50%; +} +.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-x='4'] { + left: 50%; +} +.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-min-width='4'] { + min-width: 50%; +} +.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-max-width='4'] { + max-width: 50%; +} +.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-width='5'] { + width: 62.5%; +} +.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-x='5'] { + left: 62.5%; +} +.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-min-width='5'] { + min-width: 62.5%; +} +.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-max-width='5'] { + max-width: 62.5%; +} +.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-width='6'] { + width: 75%; +} +.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-x='6'] { + left: 75%; +} +.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-min-width='6'] { + min-width: 75%; +} +.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-max-width='6'] { + max-width: 75%; +} +.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-width='7'] { + width: 87.5%; +} +.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-x='7'] { + left: 87.5%; +} +.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-min-width='7'] { + min-width: 87.5%; +} +.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-max-width='7'] { + max-width: 87.5%; +} +.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-width='8'] { + width: 100%; +} +.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-x='8'] { + left: 100%; +} +.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-min-width='8'] { + min-width: 100%; +} +.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-max-width='8'] { + max-width: 100%; +} + +.grid-stack.grid-stack-9 > .grid-stack-item { + min-width: 11.11111111%; +} +.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-width='1'] { + width: 11.11111111%; +} +.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-x='1'] { + left: 11.11111111%; +} +.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-min-width='1'] { + min-width: 11.11111111%; +} +.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-max-width='1'] { + max-width: 11.11111111%; +} +.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-width='2'] { + width: 22.22222222%; +} +.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-x='2'] { + left: 22.22222222%; +} +.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-min-width='2'] { + min-width: 22.22222222%; +} +.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-max-width='2'] { + max-width: 22.22222222%; +} +.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-width='3'] { + width: 33.33333333%; +} +.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-x='3'] { + left: 33.33333333%; +} +.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-min-width='3'] { + min-width: 33.33333333%; +} +.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-max-width='3'] { + max-width: 33.33333333%; +} +.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-width='4'] { + width: 44.44444444%; +} +.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-x='4'] { + left: 44.44444444%; +} +.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-min-width='4'] { + min-width: 44.44444444%; +} +.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-max-width='4'] { + max-width: 44.44444444%; +} +.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-width='5'] { + width: 55.55555556%; +} +.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-x='5'] { + left: 55.55555556%; +} +.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-min-width='5'] { + min-width: 55.55555556%; +} +.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-max-width='5'] { + max-width: 55.55555556%; +} +.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-width='6'] { + width: 66.66666667%; +} +.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-x='6'] { + left: 66.66666667%; +} +.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-min-width='6'] { + min-width: 66.66666667%; +} +.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-max-width='6'] { + max-width: 66.66666667%; +} +.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-width='7'] { + width: 77.77777778%; +} +.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-x='7'] { + left: 77.77777778%; +} +.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-min-width='7'] { + min-width: 77.77777778%; +} +.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-max-width='7'] { + max-width: 77.77777778%; +} +.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-width='8'] { + width: 88.88888889%; +} +.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-x='8'] { + left: 88.88888889%; +} +.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-min-width='8'] { + min-width: 88.88888889%; +} +.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-max-width='8'] { + max-width: 88.88888889%; +} +.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-width='9'] { + width: 100%; +} +.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-x='9'] { + left: 100%; +} +.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-min-width='9'] { + min-width: 100%; +} +.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-max-width='9'] { + max-width: 100%; +} + +.grid-stack.grid-stack-10 > .grid-stack-item { + min-width: 10%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-width='1'] { + width: 10%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-x='1'] { + left: 10%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-min-width='1'] { + min-width: 10%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-max-width='1'] { + max-width: 10%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-width='2'] { + width: 20%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-x='2'] { + left: 20%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-min-width='2'] { + min-width: 20%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-max-width='2'] { + max-width: 20%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-width='3'] { + width: 30%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-x='3'] { + left: 30%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-min-width='3'] { + min-width: 30%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-max-width='3'] { + max-width: 30%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-width='4'] { + width: 40%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-x='4'] { + left: 40%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-min-width='4'] { + min-width: 40%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-max-width='4'] { + max-width: 40%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-width='5'] { + width: 50%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-x='5'] { + left: 50%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-min-width='5'] { + min-width: 50%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-max-width='5'] { + max-width: 50%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-width='6'] { + width: 60%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-x='6'] { + left: 60%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-min-width='6'] { + min-width: 60%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-max-width='6'] { + max-width: 60%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-width='7'] { + width: 70%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-x='7'] { + left: 70%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-min-width='7'] { + min-width: 70%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-max-width='7'] { + max-width: 70%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-width='8'] { + width: 80%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-x='8'] { + left: 80%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-min-width='8'] { + min-width: 80%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-max-width='8'] { + max-width: 80%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-width='9'] { + width: 90%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-x='9'] { + left: 90%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-min-width='9'] { + min-width: 90%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-max-width='9'] { + max-width: 90%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-width='10'] { + width: 100%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-x='10'] { + left: 100%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-min-width='10'] { + min-width: 100%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-max-width='10'] { + max-width: 100%; +} + +.grid-stack.grid-stack-11 > .grid-stack-item { + min-width: 9.09090909%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-width='1'] { + width: 9.09090909%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-x='1'] { + left: 9.09090909%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-min-width='1'] { + min-width: 9.09090909%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-max-width='1'] { + max-width: 9.09090909%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-width='2'] { + width: 18.18181818%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-x='2'] { + left: 18.18181818%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-min-width='2'] { + min-width: 18.18181818%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-max-width='2'] { + max-width: 18.18181818%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-width='3'] { + width: 27.27272727%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-x='3'] { + left: 27.27272727%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-min-width='3'] { + min-width: 27.27272727%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-max-width='3'] { + max-width: 27.27272727%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-width='4'] { + width: 36.36363636%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-x='4'] { + left: 36.36363636%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-min-width='4'] { + min-width: 36.36363636%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-max-width='4'] { + max-width: 36.36363636%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-width='5'] { + width: 45.45454545%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-x='5'] { + left: 45.45454545%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-min-width='5'] { + min-width: 45.45454545%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-max-width='5'] { + max-width: 45.45454545%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-width='6'] { + width: 54.54545455%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-x='6'] { + left: 54.54545455%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-min-width='6'] { + min-width: 54.54545455%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-max-width='6'] { + max-width: 54.54545455%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-width='7'] { + width: 63.63636364%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-x='7'] { + left: 63.63636364%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-min-width='7'] { + min-width: 63.63636364%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-max-width='7'] { + max-width: 63.63636364%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-width='8'] { + width: 72.72727273%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-x='8'] { + left: 72.72727273%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-min-width='8'] { + min-width: 72.72727273%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-max-width='8'] { + max-width: 72.72727273%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-width='9'] { + width: 81.81818182%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-x='9'] { + left: 81.81818182%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-min-width='9'] { + min-width: 81.81818182%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-max-width='9'] { + max-width: 81.81818182%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-width='10'] { + width: 90.90909091%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-x='10'] { + left: 90.90909091%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-min-width='10'] { + min-width: 90.90909091%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-max-width='10'] { + max-width: 90.90909091%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-width='11'] { + width: 100.0%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-x='11'] { + left: 100.0%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-min-width='11'] { + min-width: 100.0%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-max-width='11'] { + max-width: 100.0%; +} + +.grid-stack.grid-stack-12 > .grid-stack-item { + min-width: 8.33333333%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-width='1'] { + width: 8.33333333%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-x='1'] { + left: 8.33333333%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-min-width='1'] { + min-width: 8.33333333%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-max-width='1'] { + max-width: 8.33333333%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-width='2'] { + width: 16.66666667%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-x='2'] { + left: 16.66666667%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-min-width='2'] { + min-width: 16.66666667%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-max-width='2'] { + max-width: 16.66666667%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-width='3'] { + width: 25%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-x='3'] { + left: 25%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-min-width='3'] { + min-width: 25%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-max-width='3'] { + max-width: 25%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-width='4'] { + width: 33.33333333%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-x='4'] { + left: 33.33333333%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-min-width='4'] { + min-width: 33.33333333%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-max-width='4'] { + max-width: 33.33333333%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-width='5'] { + width: 41.66666667%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-x='5'] { + left: 41.66666667%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-min-width='5'] { + min-width: 41.66666667%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-max-width='5'] { + max-width: 41.66666667%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-width='6'] { + width: 50%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-x='6'] { + left: 50%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-min-width='6'] { + min-width: 50%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-max-width='6'] { + max-width: 50%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-width='7'] { + width: 58.33333333%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-x='7'] { + left: 58.33333333%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-min-width='7'] { + min-width: 58.33333333%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-max-width='7'] { + max-width: 58.33333333%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-width='8'] { + width: 66.66666667%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-x='8'] { + left: 66.66666667%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-min-width='8'] { + min-width: 66.66666667%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-max-width='8'] { + max-width: 66.66666667%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-width='9'] { + width: 75%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-x='9'] { + left: 75%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-min-width='9'] { + min-width: 75%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-max-width='9'] { + max-width: 75%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-width='10'] { + width: 83.33333333%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-x='10'] { + left: 83.33333333%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-min-width='10'] { + min-width: 83.33333333%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-max-width='10'] { + max-width: 83.33333333%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-width='11'] { + width: 91.66666667%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-x='11'] { + left: 91.66666667%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-min-width='11'] { + min-width: 91.66666667%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-max-width='11'] { + max-width: 91.66666667%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-width='12'] { + width: 100%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-x='12'] { + left: 100%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-min-width='12'] { + min-width: 100%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-max-width='12'] { + max-width: 100%; +} diff --git a/dist/gridstack-extra.min.css b/dist/gridstack-extra.min.css new file mode 100644 index 0000000..fb9b777 --- /dev/null +++ b/dist/gridstack-extra.min.css @@ -0,0 +1 @@ +.grid-stack.grid-stack-1>.grid-stack-item{min-width:100%}.grid-stack.grid-stack-1>.grid-stack-item[data-gs-width='1']{width:100%}.grid-stack.grid-stack-1>.grid-stack-item[data-gs-x='1']{left:100%}.grid-stack.grid-stack-1>.grid-stack-item[data-gs-min-width='1']{min-width:100%}.grid-stack.grid-stack-1>.grid-stack-item[data-gs-max-width='1']{max-width:100%}.grid-stack.grid-stack-2>.grid-stack-item{min-width:50%}.grid-stack.grid-stack-2>.grid-stack-item[data-gs-width='1']{width:50%}.grid-stack.grid-stack-2>.grid-stack-item[data-gs-x='1']{left:50%}.grid-stack.grid-stack-2>.grid-stack-item[data-gs-min-width='1']{min-width:50%}.grid-stack.grid-stack-2>.grid-stack-item[data-gs-max-width='1']{max-width:50%}.grid-stack.grid-stack-2>.grid-stack-item[data-gs-width='2']{width:100%}.grid-stack.grid-stack-2>.grid-stack-item[data-gs-x='2']{left:100%}.grid-stack.grid-stack-2>.grid-stack-item[data-gs-min-width='2']{min-width:100%}.grid-stack.grid-stack-2>.grid-stack-item[data-gs-max-width='2']{max-width:100%}.grid-stack.grid-stack-3>.grid-stack-item{min-width:33.33333333%}.grid-stack.grid-stack-3>.grid-stack-item[data-gs-width='1']{width:33.33333333%}.grid-stack.grid-stack-3>.grid-stack-item[data-gs-x='1']{left:33.33333333%}.grid-stack.grid-stack-3>.grid-stack-item[data-gs-min-width='1']{min-width:33.33333333%}.grid-stack.grid-stack-3>.grid-stack-item[data-gs-max-width='1']{max-width:33.33333333%}.grid-stack.grid-stack-3>.grid-stack-item[data-gs-width='2']{width:66.66666667%}.grid-stack.grid-stack-3>.grid-stack-item[data-gs-x='2']{left:66.66666667%}.grid-stack.grid-stack-3>.grid-stack-item[data-gs-min-width='2']{min-width:66.66666667%}.grid-stack.grid-stack-3>.grid-stack-item[data-gs-max-width='2']{max-width:66.66666667%}.grid-stack.grid-stack-3>.grid-stack-item[data-gs-width='3']{width:100%}.grid-stack.grid-stack-3>.grid-stack-item[data-gs-x='3']{left:100%}.grid-stack.grid-stack-3>.grid-stack-item[data-gs-min-width='3']{min-width:100%}.grid-stack.grid-stack-3>.grid-stack-item[data-gs-max-width='3']{max-width:100%}.grid-stack.grid-stack-4>.grid-stack-item{min-width:25%}.grid-stack.grid-stack-4>.grid-stack-item[data-gs-width='1']{width:25%}.grid-stack.grid-stack-4>.grid-stack-item[data-gs-x='1']{left:25%}.grid-stack.grid-stack-4>.grid-stack-item[data-gs-min-width='1']{min-width:25%}.grid-stack.grid-stack-4>.grid-stack-item[data-gs-max-width='1']{max-width:25%}.grid-stack.grid-stack-4>.grid-stack-item[data-gs-width='2']{width:50%}.grid-stack.grid-stack-4>.grid-stack-item[data-gs-x='2']{left:50%}.grid-stack.grid-stack-4>.grid-stack-item[data-gs-min-width='2']{min-width:50%}.grid-stack.grid-stack-4>.grid-stack-item[data-gs-max-width='2']{max-width:50%}.grid-stack.grid-stack-4>.grid-stack-item[data-gs-width='3']{width:75%}.grid-stack.grid-stack-4>.grid-stack-item[data-gs-x='3']{left:75%}.grid-stack.grid-stack-4>.grid-stack-item[data-gs-min-width='3']{min-width:75%}.grid-stack.grid-stack-4>.grid-stack-item[data-gs-max-width='3']{max-width:75%}.grid-stack.grid-stack-4>.grid-stack-item[data-gs-width='4']{width:100%}.grid-stack.grid-stack-4>.grid-stack-item[data-gs-x='4']{left:100%}.grid-stack.grid-stack-4>.grid-stack-item[data-gs-min-width='4']{min-width:100%}.grid-stack.grid-stack-4>.grid-stack-item[data-gs-max-width='4']{max-width:100%}.grid-stack.grid-stack-5>.grid-stack-item{min-width:20%}.grid-stack.grid-stack-5>.grid-stack-item[data-gs-width='1']{width:20%}.grid-stack.grid-stack-5>.grid-stack-item[data-gs-x='1']{left:20%}.grid-stack.grid-stack-5>.grid-stack-item[data-gs-min-width='1']{min-width:20%}.grid-stack.grid-stack-5>.grid-stack-item[data-gs-max-width='1']{max-width:20%}.grid-stack.grid-stack-5>.grid-stack-item[data-gs-width='2']{width:40%}.grid-stack.grid-stack-5>.grid-stack-item[data-gs-x='2']{left:40%}.grid-stack.grid-stack-5>.grid-stack-item[data-gs-min-width='2']{min-width:40%}.grid-stack.grid-stack-5>.grid-stack-item[data-gs-max-width='2']{max-width:40%}.grid-stack.grid-stack-5>.grid-stack-item[data-gs-width='3']{width:60%}.grid-stack.grid-stack-5>.grid-stack-item[data-gs-x='3']{left:60%}.grid-stack.grid-stack-5>.grid-stack-item[data-gs-min-width='3']{min-width:60%}.grid-stack.grid-stack-5>.grid-stack-item[data-gs-max-width='3']{max-width:60%}.grid-stack.grid-stack-5>.grid-stack-item[data-gs-width='4']{width:80%}.grid-stack.grid-stack-5>.grid-stack-item[data-gs-x='4']{left:80%}.grid-stack.grid-stack-5>.grid-stack-item[data-gs-min-width='4']{min-width:80%}.grid-stack.grid-stack-5>.grid-stack-item[data-gs-max-width='4']{max-width:80%}.grid-stack.grid-stack-5>.grid-stack-item[data-gs-width='5']{width:100%}.grid-stack.grid-stack-5>.grid-stack-item[data-gs-x='5']{left:100%}.grid-stack.grid-stack-5>.grid-stack-item[data-gs-min-width='5']{min-width:100%}.grid-stack.grid-stack-5>.grid-stack-item[data-gs-max-width='5']{max-width:100%}.grid-stack.grid-stack-6>.grid-stack-item{min-width:16.66666667%}.grid-stack.grid-stack-6>.grid-stack-item[data-gs-width='1']{width:16.66666667%}.grid-stack.grid-stack-6>.grid-stack-item[data-gs-x='1']{left:16.66666667%}.grid-stack.grid-stack-6>.grid-stack-item[data-gs-min-width='1']{min-width:16.66666667%}.grid-stack.grid-stack-6>.grid-stack-item[data-gs-max-width='1']{max-width:16.66666667%}.grid-stack.grid-stack-6>.grid-stack-item[data-gs-width='2']{width:33.33333333%}.grid-stack.grid-stack-6>.grid-stack-item[data-gs-x='2']{left:33.33333333%}.grid-stack.grid-stack-6>.grid-stack-item[data-gs-min-width='2']{min-width:33.33333333%}.grid-stack.grid-stack-6>.grid-stack-item[data-gs-max-width='2']{max-width:33.33333333%}.grid-stack.grid-stack-6>.grid-stack-item[data-gs-width='3']{width:50%}.grid-stack.grid-stack-6>.grid-stack-item[data-gs-x='3']{left:50%}.grid-stack.grid-stack-6>.grid-stack-item[data-gs-min-width='3']{min-width:50%}.grid-stack.grid-stack-6>.grid-stack-item[data-gs-max-width='3']{max-width:50%}.grid-stack.grid-stack-6>.grid-stack-item[data-gs-width='4']{width:66.66666667%}.grid-stack.grid-stack-6>.grid-stack-item[data-gs-x='4']{left:66.66666667%}.grid-stack.grid-stack-6>.grid-stack-item[data-gs-min-width='4']{min-width:66.66666667%}.grid-stack.grid-stack-6>.grid-stack-item[data-gs-max-width='4']{max-width:66.66666667%}.grid-stack.grid-stack-6>.grid-stack-item[data-gs-width='5']{width:83.33333333%}.grid-stack.grid-stack-6>.grid-stack-item[data-gs-x='5']{left:83.33333333%}.grid-stack.grid-stack-6>.grid-stack-item[data-gs-min-width='5']{min-width:83.33333333%}.grid-stack.grid-stack-6>.grid-stack-item[data-gs-max-width='5']{max-width:83.33333333%}.grid-stack.grid-stack-6>.grid-stack-item[data-gs-width='6']{width:100%}.grid-stack.grid-stack-6>.grid-stack-item[data-gs-x='6']{left:100%}.grid-stack.grid-stack-6>.grid-stack-item[data-gs-min-width='6']{min-width:100%}.grid-stack.grid-stack-6>.grid-stack-item[data-gs-max-width='6']{max-width:100%}.grid-stack.grid-stack-7>.grid-stack-item{min-width:14.28571429%}.grid-stack.grid-stack-7>.grid-stack-item[data-gs-width='1']{width:14.28571429%}.grid-stack.grid-stack-7>.grid-stack-item[data-gs-x='1']{left:14.28571429%}.grid-stack.grid-stack-7>.grid-stack-item[data-gs-min-width='1']{min-width:14.28571429%}.grid-stack.grid-stack-7>.grid-stack-item[data-gs-max-width='1']{max-width:14.28571429%}.grid-stack.grid-stack-7>.grid-stack-item[data-gs-width='2']{width:28.57142857%}.grid-stack.grid-stack-7>.grid-stack-item[data-gs-x='2']{left:28.57142857%}.grid-stack.grid-stack-7>.grid-stack-item[data-gs-min-width='2']{min-width:28.57142857%}.grid-stack.grid-stack-7>.grid-stack-item[data-gs-max-width='2']{max-width:28.57142857%}.grid-stack.grid-stack-7>.grid-stack-item[data-gs-width='3']{width:42.85714286%}.grid-stack.grid-stack-7>.grid-stack-item[data-gs-x='3']{left:42.85714286%}.grid-stack.grid-stack-7>.grid-stack-item[data-gs-min-width='3']{min-width:42.85714286%}.grid-stack.grid-stack-7>.grid-stack-item[data-gs-max-width='3']{max-width:42.85714286%}.grid-stack.grid-stack-7>.grid-stack-item[data-gs-width='4']{width:57.14285714%}.grid-stack.grid-stack-7>.grid-stack-item[data-gs-x='4']{left:57.14285714%}.grid-stack.grid-stack-7>.grid-stack-item[data-gs-min-width='4']{min-width:57.14285714%}.grid-stack.grid-stack-7>.grid-stack-item[data-gs-max-width='4']{max-width:57.14285714%}.grid-stack.grid-stack-7>.grid-stack-item[data-gs-width='5']{width:71.42857143%}.grid-stack.grid-stack-7>.grid-stack-item[data-gs-x='5']{left:71.42857143%}.grid-stack.grid-stack-7>.grid-stack-item[data-gs-min-width='5']{min-width:71.42857143%}.grid-stack.grid-stack-7>.grid-stack-item[data-gs-max-width='5']{max-width:71.42857143%}.grid-stack.grid-stack-7>.grid-stack-item[data-gs-width='6']{width:85.71428571%}.grid-stack.grid-stack-7>.grid-stack-item[data-gs-x='6']{left:85.71428571%}.grid-stack.grid-stack-7>.grid-stack-item[data-gs-min-width='6']{min-width:85.71428571%}.grid-stack.grid-stack-7>.grid-stack-item[data-gs-max-width='6']{max-width:85.71428571%}.grid-stack.grid-stack-7>.grid-stack-item[data-gs-width='7']{width:100%}.grid-stack.grid-stack-7>.grid-stack-item[data-gs-x='7']{left:100%}.grid-stack.grid-stack-7>.grid-stack-item[data-gs-min-width='7']{min-width:100%}.grid-stack.grid-stack-7>.grid-stack-item[data-gs-max-width='7']{max-width:100%}.grid-stack.grid-stack-8>.grid-stack-item{min-width:12.5%}.grid-stack.grid-stack-8>.grid-stack-item[data-gs-width='1']{width:12.5%}.grid-stack.grid-stack-8>.grid-stack-item[data-gs-x='1']{left:12.5%}.grid-stack.grid-stack-8>.grid-stack-item[data-gs-min-width='1']{min-width:12.5%}.grid-stack.grid-stack-8>.grid-stack-item[data-gs-max-width='1']{max-width:12.5%}.grid-stack.grid-stack-8>.grid-stack-item[data-gs-width='2']{width:25%}.grid-stack.grid-stack-8>.grid-stack-item[data-gs-x='2']{left:25%}.grid-stack.grid-stack-8>.grid-stack-item[data-gs-min-width='2']{min-width:25%}.grid-stack.grid-stack-8>.grid-stack-item[data-gs-max-width='2']{max-width:25%}.grid-stack.grid-stack-8>.grid-stack-item[data-gs-width='3']{width:37.5%}.grid-stack.grid-stack-8>.grid-stack-item[data-gs-x='3']{left:37.5%}.grid-stack.grid-stack-8>.grid-stack-item[data-gs-min-width='3']{min-width:37.5%}.grid-stack.grid-stack-8>.grid-stack-item[data-gs-max-width='3']{max-width:37.5%}.grid-stack.grid-stack-8>.grid-stack-item[data-gs-width='4']{width:50%}.grid-stack.grid-stack-8>.grid-stack-item[data-gs-x='4']{left:50%}.grid-stack.grid-stack-8>.grid-stack-item[data-gs-min-width='4']{min-width:50%}.grid-stack.grid-stack-8>.grid-stack-item[data-gs-max-width='4']{max-width:50%}.grid-stack.grid-stack-8>.grid-stack-item[data-gs-width='5']{width:62.5%}.grid-stack.grid-stack-8>.grid-stack-item[data-gs-x='5']{left:62.5%}.grid-stack.grid-stack-8>.grid-stack-item[data-gs-min-width='5']{min-width:62.5%}.grid-stack.grid-stack-8>.grid-stack-item[data-gs-max-width='5']{max-width:62.5%}.grid-stack.grid-stack-8>.grid-stack-item[data-gs-width='6']{width:75%}.grid-stack.grid-stack-8>.grid-stack-item[data-gs-x='6']{left:75%}.grid-stack.grid-stack-8>.grid-stack-item[data-gs-min-width='6']{min-width:75%}.grid-stack.grid-stack-8>.grid-stack-item[data-gs-max-width='6']{max-width:75%}.grid-stack.grid-stack-8>.grid-stack-item[data-gs-width='7']{width:87.5%}.grid-stack.grid-stack-8>.grid-stack-item[data-gs-x='7']{left:87.5%}.grid-stack.grid-stack-8>.grid-stack-item[data-gs-min-width='7']{min-width:87.5%}.grid-stack.grid-stack-8>.grid-stack-item[data-gs-max-width='7']{max-width:87.5%}.grid-stack.grid-stack-8>.grid-stack-item[data-gs-width='8']{width:100%}.grid-stack.grid-stack-8>.grid-stack-item[data-gs-x='8']{left:100%}.grid-stack.grid-stack-8>.grid-stack-item[data-gs-min-width='8']{min-width:100%}.grid-stack.grid-stack-8>.grid-stack-item[data-gs-max-width='8']{max-width:100%}.grid-stack.grid-stack-9>.grid-stack-item{min-width:11.11111111%}.grid-stack.grid-stack-9>.grid-stack-item[data-gs-width='1']{width:11.11111111%}.grid-stack.grid-stack-9>.grid-stack-item[data-gs-x='1']{left:11.11111111%}.grid-stack.grid-stack-9>.grid-stack-item[data-gs-min-width='1']{min-width:11.11111111%}.grid-stack.grid-stack-9>.grid-stack-item[data-gs-max-width='1']{max-width:11.11111111%}.grid-stack.grid-stack-9>.grid-stack-item[data-gs-width='2']{width:22.22222222%}.grid-stack.grid-stack-9>.grid-stack-item[data-gs-x='2']{left:22.22222222%}.grid-stack.grid-stack-9>.grid-stack-item[data-gs-min-width='2']{min-width:22.22222222%}.grid-stack.grid-stack-9>.grid-stack-item[data-gs-max-width='2']{max-width:22.22222222%}.grid-stack.grid-stack-9>.grid-stack-item[data-gs-width='3']{width:33.33333333%}.grid-stack.grid-stack-9>.grid-stack-item[data-gs-x='3']{left:33.33333333%}.grid-stack.grid-stack-9>.grid-stack-item[data-gs-min-width='3']{min-width:33.33333333%}.grid-stack.grid-stack-9>.grid-stack-item[data-gs-max-width='3']{max-width:33.33333333%}.grid-stack.grid-stack-9>.grid-stack-item[data-gs-width='4']{width:44.44444444%}.grid-stack.grid-stack-9>.grid-stack-item[data-gs-x='4']{left:44.44444444%}.grid-stack.grid-stack-9>.grid-stack-item[data-gs-min-width='4']{min-width:44.44444444%}.grid-stack.grid-stack-9>.grid-stack-item[data-gs-max-width='4']{max-width:44.44444444%}.grid-stack.grid-stack-9>.grid-stack-item[data-gs-width='5']{width:55.55555556%}.grid-stack.grid-stack-9>.grid-stack-item[data-gs-x='5']{left:55.55555556%}.grid-stack.grid-stack-9>.grid-stack-item[data-gs-min-width='5']{min-width:55.55555556%}.grid-stack.grid-stack-9>.grid-stack-item[data-gs-max-width='5']{max-width:55.55555556%}.grid-stack.grid-stack-9>.grid-stack-item[data-gs-width='6']{width:66.66666667%}.grid-stack.grid-stack-9>.grid-stack-item[data-gs-x='6']{left:66.66666667%}.grid-stack.grid-stack-9>.grid-stack-item[data-gs-min-width='6']{min-width:66.66666667%}.grid-stack.grid-stack-9>.grid-stack-item[data-gs-max-width='6']{max-width:66.66666667%}.grid-stack.grid-stack-9>.grid-stack-item[data-gs-width='7']{width:77.77777778%}.grid-stack.grid-stack-9>.grid-stack-item[data-gs-x='7']{left:77.77777778%}.grid-stack.grid-stack-9>.grid-stack-item[data-gs-min-width='7']{min-width:77.77777778%}.grid-stack.grid-stack-9>.grid-stack-item[data-gs-max-width='7']{max-width:77.77777778%}.grid-stack.grid-stack-9>.grid-stack-item[data-gs-width='8']{width:88.88888889%}.grid-stack.grid-stack-9>.grid-stack-item[data-gs-x='8']{left:88.88888889%}.grid-stack.grid-stack-9>.grid-stack-item[data-gs-min-width='8']{min-width:88.88888889%}.grid-stack.grid-stack-9>.grid-stack-item[data-gs-max-width='8']{max-width:88.88888889%}.grid-stack.grid-stack-9>.grid-stack-item[data-gs-width='9']{width:100%}.grid-stack.grid-stack-9>.grid-stack-item[data-gs-x='9']{left:100%}.grid-stack.grid-stack-9>.grid-stack-item[data-gs-min-width='9']{min-width:100%}.grid-stack.grid-stack-9>.grid-stack-item[data-gs-max-width='9']{max-width:100%}.grid-stack.grid-stack-10>.grid-stack-item{min-width:10%}.grid-stack.grid-stack-10>.grid-stack-item[data-gs-width='1']{width:10%}.grid-stack.grid-stack-10>.grid-stack-item[data-gs-x='1']{left:10%}.grid-stack.grid-stack-10>.grid-stack-item[data-gs-min-width='1']{min-width:10%}.grid-stack.grid-stack-10>.grid-stack-item[data-gs-max-width='1']{max-width:10%}.grid-stack.grid-stack-10>.grid-stack-item[data-gs-width='2']{width:20%}.grid-stack.grid-stack-10>.grid-stack-item[data-gs-x='2']{left:20%}.grid-stack.grid-stack-10>.grid-stack-item[data-gs-min-width='2']{min-width:20%}.grid-stack.grid-stack-10>.grid-stack-item[data-gs-max-width='2']{max-width:20%}.grid-stack.grid-stack-10>.grid-stack-item[data-gs-width='3']{width:30%}.grid-stack.grid-stack-10>.grid-stack-item[data-gs-x='3']{left:30%}.grid-stack.grid-stack-10>.grid-stack-item[data-gs-min-width='3']{min-width:30%}.grid-stack.grid-stack-10>.grid-stack-item[data-gs-max-width='3']{max-width:30%}.grid-stack.grid-stack-10>.grid-stack-item[data-gs-width='4']{width:40%}.grid-stack.grid-stack-10>.grid-stack-item[data-gs-x='4']{left:40%}.grid-stack.grid-stack-10>.grid-stack-item[data-gs-min-width='4']{min-width:40%}.grid-stack.grid-stack-10>.grid-stack-item[data-gs-max-width='4']{max-width:40%}.grid-stack.grid-stack-10>.grid-stack-item[data-gs-width='5']{width:50%}.grid-stack.grid-stack-10>.grid-stack-item[data-gs-x='5']{left:50%}.grid-stack.grid-stack-10>.grid-stack-item[data-gs-min-width='5']{min-width:50%}.grid-stack.grid-stack-10>.grid-stack-item[data-gs-max-width='5']{max-width:50%}.grid-stack.grid-stack-10>.grid-stack-item[data-gs-width='6']{width:60%}.grid-stack.grid-stack-10>.grid-stack-item[data-gs-x='6']{left:60%}.grid-stack.grid-stack-10>.grid-stack-item[data-gs-min-width='6']{min-width:60%}.grid-stack.grid-stack-10>.grid-stack-item[data-gs-max-width='6']{max-width:60%}.grid-stack.grid-stack-10>.grid-stack-item[data-gs-width='7']{width:70%}.grid-stack.grid-stack-10>.grid-stack-item[data-gs-x='7']{left:70%}.grid-stack.grid-stack-10>.grid-stack-item[data-gs-min-width='7']{min-width:70%}.grid-stack.grid-stack-10>.grid-stack-item[data-gs-max-width='7']{max-width:70%}.grid-stack.grid-stack-10>.grid-stack-item[data-gs-width='8']{width:80%}.grid-stack.grid-stack-10>.grid-stack-item[data-gs-x='8']{left:80%}.grid-stack.grid-stack-10>.grid-stack-item[data-gs-min-width='8']{min-width:80%}.grid-stack.grid-stack-10>.grid-stack-item[data-gs-max-width='8']{max-width:80%}.grid-stack.grid-stack-10>.grid-stack-item[data-gs-width='9']{width:90%}.grid-stack.grid-stack-10>.grid-stack-item[data-gs-x='9']{left:90%}.grid-stack.grid-stack-10>.grid-stack-item[data-gs-min-width='9']{min-width:90%}.grid-stack.grid-stack-10>.grid-stack-item[data-gs-max-width='9']{max-width:90%}.grid-stack.grid-stack-10>.grid-stack-item[data-gs-width='10']{width:100%}.grid-stack.grid-stack-10>.grid-stack-item[data-gs-x='10']{left:100%}.grid-stack.grid-stack-10>.grid-stack-item[data-gs-min-width='10']{min-width:100%}.grid-stack.grid-stack-10>.grid-stack-item[data-gs-max-width='10']{max-width:100%}.grid-stack.grid-stack-11>.grid-stack-item{min-width:9.09090909%}.grid-stack.grid-stack-11>.grid-stack-item[data-gs-width='1']{width:9.09090909%}.grid-stack.grid-stack-11>.grid-stack-item[data-gs-x='1']{left:9.09090909%}.grid-stack.grid-stack-11>.grid-stack-item[data-gs-min-width='1']{min-width:9.09090909%}.grid-stack.grid-stack-11>.grid-stack-item[data-gs-max-width='1']{max-width:9.09090909%}.grid-stack.grid-stack-11>.grid-stack-item[data-gs-width='2']{width:18.18181818%}.grid-stack.grid-stack-11>.grid-stack-item[data-gs-x='2']{left:18.18181818%}.grid-stack.grid-stack-11>.grid-stack-item[data-gs-min-width='2']{min-width:18.18181818%}.grid-stack.grid-stack-11>.grid-stack-item[data-gs-max-width='2']{max-width:18.18181818%}.grid-stack.grid-stack-11>.grid-stack-item[data-gs-width='3']{width:27.27272727%}.grid-stack.grid-stack-11>.grid-stack-item[data-gs-x='3']{left:27.27272727%}.grid-stack.grid-stack-11>.grid-stack-item[data-gs-min-width='3']{min-width:27.27272727%}.grid-stack.grid-stack-11>.grid-stack-item[data-gs-max-width='3']{max-width:27.27272727%}.grid-stack.grid-stack-11>.grid-stack-item[data-gs-width='4']{width:36.36363636%}.grid-stack.grid-stack-11>.grid-stack-item[data-gs-x='4']{left:36.36363636%}.grid-stack.grid-stack-11>.grid-stack-item[data-gs-min-width='4']{min-width:36.36363636%}.grid-stack.grid-stack-11>.grid-stack-item[data-gs-max-width='4']{max-width:36.36363636%}.grid-stack.grid-stack-11>.grid-stack-item[data-gs-width='5']{width:45.45454545%}.grid-stack.grid-stack-11>.grid-stack-item[data-gs-x='5']{left:45.45454545%}.grid-stack.grid-stack-11>.grid-stack-item[data-gs-min-width='5']{min-width:45.45454545%}.grid-stack.grid-stack-11>.grid-stack-item[data-gs-max-width='5']{max-width:45.45454545%}.grid-stack.grid-stack-11>.grid-stack-item[data-gs-width='6']{width:54.54545455%}.grid-stack.grid-stack-11>.grid-stack-item[data-gs-x='6']{left:54.54545455%}.grid-stack.grid-stack-11>.grid-stack-item[data-gs-min-width='6']{min-width:54.54545455%}.grid-stack.grid-stack-11>.grid-stack-item[data-gs-max-width='6']{max-width:54.54545455%}.grid-stack.grid-stack-11>.grid-stack-item[data-gs-width='7']{width:63.63636364%}.grid-stack.grid-stack-11>.grid-stack-item[data-gs-x='7']{left:63.63636364%}.grid-stack.grid-stack-11>.grid-stack-item[data-gs-min-width='7']{min-width:63.63636364%}.grid-stack.grid-stack-11>.grid-stack-item[data-gs-max-width='7']{max-width:63.63636364%}.grid-stack.grid-stack-11>.grid-stack-item[data-gs-width='8']{width:72.72727273%}.grid-stack.grid-stack-11>.grid-stack-item[data-gs-x='8']{left:72.72727273%}.grid-stack.grid-stack-11>.grid-stack-item[data-gs-min-width='8']{min-width:72.72727273%}.grid-stack.grid-stack-11>.grid-stack-item[data-gs-max-width='8']{max-width:72.72727273%}.grid-stack.grid-stack-11>.grid-stack-item[data-gs-width='9']{width:81.81818182%}.grid-stack.grid-stack-11>.grid-stack-item[data-gs-x='9']{left:81.81818182%}.grid-stack.grid-stack-11>.grid-stack-item[data-gs-min-width='9']{min-width:81.81818182%}.grid-stack.grid-stack-11>.grid-stack-item[data-gs-max-width='9']{max-width:81.81818182%}.grid-stack.grid-stack-11>.grid-stack-item[data-gs-width='10']{width:90.90909091%}.grid-stack.grid-stack-11>.grid-stack-item[data-gs-x='10']{left:90.90909091%}.grid-stack.grid-stack-11>.grid-stack-item[data-gs-min-width='10']{min-width:90.90909091%}.grid-stack.grid-stack-11>.grid-stack-item[data-gs-max-width='10']{max-width:90.90909091%}.grid-stack.grid-stack-11>.grid-stack-item[data-gs-width='11']{width:100.0}.grid-stack.grid-stack-11>.grid-stack-item[data-gs-x='11']{left:100.0}.grid-stack.grid-stack-11>.grid-stack-item[data-gs-min-width='11']{min-width:100.0}.grid-stack.grid-stack-11>.grid-stack-item[data-gs-max-width='11']{max-width:100.0}.grid-stack.grid-stack-12>.grid-stack-item{min-width:8.33333333%}.grid-stack.grid-stack-12>.grid-stack-item[data-gs-width='1']{width:8.33333333%}.grid-stack.grid-stack-12>.grid-stack-item[data-gs-x='1']{left:8.33333333%}.grid-stack.grid-stack-12>.grid-stack-item[data-gs-min-width='1']{min-width:8.33333333%}.grid-stack.grid-stack-12>.grid-stack-item[data-gs-max-width='1']{max-width:8.33333333%}.grid-stack.grid-stack-12>.grid-stack-item[data-gs-width='2']{width:16.66666667%}.grid-stack.grid-stack-12>.grid-stack-item[data-gs-x='2']{left:16.66666667%}.grid-stack.grid-stack-12>.grid-stack-item[data-gs-min-width='2']{min-width:16.66666667%}.grid-stack.grid-stack-12>.grid-stack-item[data-gs-max-width='2']{max-width:16.66666667%}.grid-stack.grid-stack-12>.grid-stack-item[data-gs-width='3']{width:25%}.grid-stack.grid-stack-12>.grid-stack-item[data-gs-x='3']{left:25%}.grid-stack.grid-stack-12>.grid-stack-item[data-gs-min-width='3']{min-width:25%}.grid-stack.grid-stack-12>.grid-stack-item[data-gs-max-width='3']{max-width:25%}.grid-stack.grid-stack-12>.grid-stack-item[data-gs-width='4']{width:33.33333333%}.grid-stack.grid-stack-12>.grid-stack-item[data-gs-x='4']{left:33.33333333%}.grid-stack.grid-stack-12>.grid-stack-item[data-gs-min-width='4']{min-width:33.33333333%}.grid-stack.grid-stack-12>.grid-stack-item[data-gs-max-width='4']{max-width:33.33333333%}.grid-stack.grid-stack-12>.grid-stack-item[data-gs-width='5']{width:41.66666667%}.grid-stack.grid-stack-12>.grid-stack-item[data-gs-x='5']{left:41.66666667%}.grid-stack.grid-stack-12>.grid-stack-item[data-gs-min-width='5']{min-width:41.66666667%}.grid-stack.grid-stack-12>.grid-stack-item[data-gs-max-width='5']{max-width:41.66666667%}.grid-stack.grid-stack-12>.grid-stack-item[data-gs-width='6']{width:50%}.grid-stack.grid-stack-12>.grid-stack-item[data-gs-x='6']{left:50%}.grid-stack.grid-stack-12>.grid-stack-item[data-gs-min-width='6']{min-width:50%}.grid-stack.grid-stack-12>.grid-stack-item[data-gs-max-width='6']{max-width:50%}.grid-stack.grid-stack-12>.grid-stack-item[data-gs-width='7']{width:58.33333333%}.grid-stack.grid-stack-12>.grid-stack-item[data-gs-x='7']{left:58.33333333%}.grid-stack.grid-stack-12>.grid-stack-item[data-gs-min-width='7']{min-width:58.33333333%}.grid-stack.grid-stack-12>.grid-stack-item[data-gs-max-width='7']{max-width:58.33333333%}.grid-stack.grid-stack-12>.grid-stack-item[data-gs-width='8']{width:66.66666667%}.grid-stack.grid-stack-12>.grid-stack-item[data-gs-x='8']{left:66.66666667%}.grid-stack.grid-stack-12>.grid-stack-item[data-gs-min-width='8']{min-width:66.66666667%}.grid-stack.grid-stack-12>.grid-stack-item[data-gs-max-width='8']{max-width:66.66666667%}.grid-stack.grid-stack-12>.grid-stack-item[data-gs-width='9']{width:75%}.grid-stack.grid-stack-12>.grid-stack-item[data-gs-x='9']{left:75%}.grid-stack.grid-stack-12>.grid-stack-item[data-gs-min-width='9']{min-width:75%}.grid-stack.grid-stack-12>.grid-stack-item[data-gs-max-width='9']{max-width:75%}.grid-stack.grid-stack-12>.grid-stack-item[data-gs-width='10']{width:83.33333333%}.grid-stack.grid-stack-12>.grid-stack-item[data-gs-x='10']{left:83.33333333%}.grid-stack.grid-stack-12>.grid-stack-item[data-gs-min-width='10']{min-width:83.33333333%}.grid-stack.grid-stack-12>.grid-stack-item[data-gs-max-width='10']{max-width:83.33333333%}.grid-stack.grid-stack-12>.grid-stack-item[data-gs-width='11']{width:91.66666667%}.grid-stack.grid-stack-12>.grid-stack-item[data-gs-x='11']{left:91.66666667%}.grid-stack.grid-stack-12>.grid-stack-item[data-gs-min-width='11']{min-width:91.66666667%}.grid-stack.grid-stack-12>.grid-stack-item[data-gs-max-width='11']{max-width:91.66666667%}.grid-stack.grid-stack-12>.grid-stack-item[data-gs-width='12']{width:100%}.grid-stack.grid-stack-12>.grid-stack-item[data-gs-x='12']{left:100%}.grid-stack.grid-stack-12>.grid-stack-item[data-gs-min-width='12']{min-width:100%}.grid-stack.grid-stack-12>.grid-stack-item[data-gs-max-width='12']{max-width:100%} \ No newline at end of file diff --git a/dist/gridstack.js b/dist/gridstack.js index 4587c48..9b338a7 100644 --- a/dist/gridstack.js +++ b/dist/gridstack.js @@ -1,54 +1,57 @@ -// gridstack.js 0.2.3-dev +// gridstack.js 0.2.4-dev // http://troolee.github.io/gridstack.js/ // (c) 2014-2015 Pavel Reznikov // gridstack.js may be freely distributed under the MIT license. -(function (factory) { +(function(factory) { if (typeof define === 'function' && define.amd) { - define(['jquery', 'lodash'], factory); + define(['jquery', 'lodash', 'jquery-ui/core', 'jquery-ui/widget', 'jquery-ui/mouse', 'jquery-ui/draggable', + 'jquery-ui/resizable'], factory); } else { factory(jQuery, _); } -})(function ($, _) { +})(function($, _) { var scope = window; var Utils = { - is_intercepted: function (a, b) { + is_intercepted: function(a, b) { return !(a.x + a.width <= b.x || b.x + b.width <= a.x || a.y + a.height <= b.y || b.y + b.height <= a.y); }, - sort: function (nodes, dir, width) { - width = width || _.chain(nodes).map(function (node) { return node.x + node.width; }).max().value(); + sort: function(nodes, dir, width) { + width = width || _.chain(nodes).map(function(node) { return node.x + node.width; }).max().value(); dir = dir != -1 ? 1 : -1; - return _.sortBy(nodes, function (n) { return dir * (n.x + n.y * width); }); + return _.sortBy(nodes, function(n) { return dir * (n.x + n.y * width); }); }, - create_stylesheet: function (id) { - var style = document.createElement("style"); - style.setAttribute("type", "text/css"); - style.setAttribute("data-gs-id", id); + create_stylesheet: function(id) { + var style = document.createElement('style'); + style.setAttribute('type', 'text/css'); + style.setAttribute('data-gs-id', id); if (style.styleSheet) { - style.styleSheet.cssText = ""; + style.styleSheet.cssText = ''; } else { - style.appendChild(document.createTextNode("")); + style.appendChild(document.createTextNode('')); } document.getElementsByTagName('head')[0].appendChild(style); return style.sheet; }, - - insert_css_rule: function (sheet, selector, rules, index) { - if(typeof sheet.insertRule === 'function') { - sheet.insertRule(selector + "{" + rules + "}", index); + remove_stylesheet: function(id) { + $("STYLE[data-gs-id=" + id +"]").remove(); + }, + insert_css_rule: function(sheet, selector, rules, index) { + if (typeof sheet.insertRule === 'function') { + sheet.insertRule(selector + '{' + rules + '}', index); } - else if(typeof sheet.addRule === 'function') { + else if (typeof sheet.addRule === 'function') { sheet.addRule(selector, rules, index); } }, - toBool: function (v) { + toBool: function(v) { if (typeof v == 'boolean') return v; if (typeof v == 'string') { @@ -61,24 +64,24 @@ var id_seq = 0; - var GridStackEngine = function (width, onchange, float, height, items) { + var GridStackEngine = function(width, onchange, float_mode, height, items) { this.width = width; - this.float = float || false; + this['float'] = float_mode || false; this.height = height || 0; this.nodes = items || []; - this.onchange = onchange || function () {}; + this.onchange = onchange || function() {}; this._update_counter = 0; - this._float = this.float; + this._float = this['float']; }; - GridStackEngine.prototype.batch_update = function () { + GridStackEngine.prototype.batch_update = function() { this._update_counter = 1; this.float = true; }; - GridStackEngine.prototype.commit = function () { + GridStackEngine.prototype.commit = function() { this._update_counter = 0; if (this._update_counter == 0) { this.float = this._float; @@ -87,16 +90,16 @@ } }; - GridStackEngine.prototype._fix_collisions = function (node) { + GridStackEngine.prototype._fix_collisions = function(node) { this._sort_nodes(-1); - var nn = node, has_locked = Boolean(_.find(this.nodes, function (n) { return n.locked })); + var nn = node, has_locked = Boolean(_.find(this.nodes, function(n) { return n.locked })); if (!this.float && !has_locked) { nn = {x: 0, y: node.y, width: this.width, height: node.height}; } while (true) { - var collision_node = _.find(this.nodes, function (n) { + var collision_node = _.find(this.nodes, function(n) { return n != node && Utils.is_intercepted(n, nn); }, this); if (typeof collision_node == 'undefined') { @@ -107,31 +110,32 @@ } }; - GridStackEngine.prototype.is_area_empty = function (x, y, width, height) { + GridStackEngine.prototype.is_area_empty = function(x, y, width, height) { var nn = {x: x || 0, y: y || 0, width: width || 1, height: height || 1}; - var collision_node = _.find(this.nodes, function (n) { + var collision_node = _.find(this.nodes, function(n) { return Utils.is_intercepted(n, nn); }, this); return collision_node == null; }; - GridStackEngine.prototype._sort_nodes = function (dir) { + GridStackEngine.prototype._sort_nodes = function(dir) { this.nodes = Utils.sort(this.nodes, dir, this.width); }; - GridStackEngine.prototype._pack_nodes = function () { + GridStackEngine.prototype._pack_nodes = function() { this._sort_nodes(); if (this.float) { - _.each(this.nodes, function (n, i) { + _.each(this.nodes, function(n, i) { if (n._updating || typeof n._orig_y == 'undefined' || n.y == n._orig_y) return; var new_y = n.y; while (new_y >= n._orig_y) { var collision_node = _.chain(this.nodes) - .find(function (bn) { - return n != bn && Utils.is_intercepted({x: n.x, y: new_y, width: n.width, height: n.height}, bn); + .find(function(bn) { + return n != bn && + Utils.is_intercepted({x: n.x, y: new_y, width: n.width, height: n.height}, bn); }) .value(); @@ -144,7 +148,7 @@ }, this); } else { - _.each(this.nodes, function (n, i) { + _.each(this.nodes, function(n, i) { if (n.locked) return; while (n.y > 0) { @@ -154,7 +158,7 @@ if (i > 0) { var collision_node = _.chain(this.nodes) .take(i) - .find(function (bn) { + .find(function(bn) { return Utils.is_intercepted({x: n.x, y: new_y, width: n.width, height: n.height}, bn); }) .value(); @@ -171,7 +175,7 @@ } }; - GridStackEngine.prototype._prepare_node = function (node, resizing) { + GridStackEngine.prototype._prepare_node = function(node, resizing) { node = _.defaults(node || {}, {width: 1, height: 1, x: 0, y: 0 }); node.x = parseInt('' + node.x); @@ -213,7 +217,7 @@ return node; }; - GridStackEngine.prototype._notify = function () { + GridStackEngine.prototype._notify = function() { if (this._update_counter) { return; } @@ -222,12 +226,12 @@ this.onchange(deleted_nodes); }; - GridStackEngine.prototype.clean_nodes = function () { - _.each(this.nodes, function (n) {n._dirty = false }); + GridStackEngine.prototype.clean_nodes = function() { + _.each(this.nodes, function(n) {n._dirty = false }); }; - GridStackEngine.prototype.get_dirty_nodes = function () { - return _.filter(this.nodes, function (n) { return n._dirty; }); + GridStackEngine.prototype.get_dirty_nodes = function() { + return _.filter(this.nodes, function(n) { return n._dirty; }); }; GridStackEngine.prototype.add_node = function(node) { @@ -244,12 +248,12 @@ if (node.auto_position) { this._sort_nodes(); - for (var i = 0; ; ++i) { + for (var i = 0;; ++i) { var x = i % this.width, y = Math.floor(i / this.width); if (x + node.width > this.width) { continue; } - if (!_.find(this.nodes, function (n) { + if (!_.find(this.nodes, function(n) { return Utils.is_intercepted({x: x, y: y, width: node.width, height: node.height}, n); })) { node.x = x; @@ -267,15 +271,15 @@ return node; }; - GridStackEngine.prototype.remove_node = function (node) { + GridStackEngine.prototype.remove_node = function(node) { node._id = null; this.nodes = _.without(this.nodes, node); this._pack_nodes(); this._notify(node); }; - GridStackEngine.prototype.can_move_node = function (node, x, y, width, height) { - var has_locked = Boolean(_.find(this.nodes, function (n) { return n.locked })); + GridStackEngine.prototype.can_move_node = function(node, x, y, width, height) { + var has_locked = Boolean(_.find(this.nodes, function(n) { return n.locked })); if (!this.height && !has_locked) return true; @@ -286,21 +290,29 @@ null, this.float, 0, - _.map(this.nodes, function (n) { if (n == node) { cloned_node = $.extend({}, n); return cloned_node; } return $.extend({}, n) })); + _.map(this.nodes, function(n) { + if (n == node) { + cloned_node = $.extend({}, n); + return cloned_node; + } + return $.extend({}, n); + })); clone.move_node(cloned_node, x, y, width, height); var res = true; if (has_locked) - res &= !Boolean(_.find(clone.nodes, function (n) { return n != cloned_node && Boolean(n.locked) && Boolean(n._dirty); })); + res &= !Boolean(_.find(clone.nodes, function(n) { + return n != cloned_node && Boolean(n.locked) && Boolean(n._dirty); + })); if (this.height) res &= clone.get_grid_height() <= this.height; return res; }; - GridStackEngine.prototype.can_be_placed_with_respect_to_height = function (node) { + GridStackEngine.prototype.can_be_placed_with_respect_to_height = function(node) { if (!this.height) return true; @@ -309,12 +321,12 @@ null, this.float, 0, - _.map(this.nodes, function (n) { return $.extend({}, n) })); + _.map(this.nodes, function(n) { return $.extend({}, n) })); clone.add_node(node); return clone.get_grid_height() <= this.height; }; - GridStackEngine.prototype.move_node = function (node, x, y, width, height, no_pack) { + GridStackEngine.prototype.move_node = function(node, x, y, width, height, no_pack) { if (typeof x != 'number') x = node.x; if (typeof y != 'number') y = node.y; if (typeof width != 'number') width = node.width; @@ -347,28 +359,28 @@ return node; }; - GridStackEngine.prototype.get_grid_height = function () { - return _.reduce(this.nodes, function (memo, n) { return Math.max(memo, n.y + n.height); }, 0); + GridStackEngine.prototype.get_grid_height = function() { + return _.reduce(this.nodes, function(memo, n) { return Math.max(memo, n.y + n.height); }, 0); }; - GridStackEngine.prototype.begin_update = function (node) { - _.each(this.nodes, function (n) { + GridStackEngine.prototype.begin_update = function(node) { + _.each(this.nodes, function(n) { n._orig_y = n.y; }); node._updating = true; }; - GridStackEngine.prototype.end_update = function () { - _.each(this.nodes, function (n) { + GridStackEngine.prototype.end_update = function() { + _.each(this.nodes, function(n) { n._orig_y = n.y; }); - var n = _.find(this.nodes, function (n) { return n._updating; }); + var n = _.find(this.nodes, function(n) { return n._updating; }); if (n) { n._updating = false; } }; - var GridStack = function (el, opts) { + var GridStack = function(el, opts) { var self = this, one_column_mode; this.container = $(el); @@ -387,6 +399,7 @@ auto: true, min_width: 768, float: false, + static_grid: false, _class: 'grid-stack-' + (Math.random() * 10000).toFixed(0), animate: Boolean(this.container.attr('data-gs-animate')) || false, always_show_resize_handle: opts.always_show_resize_handle || false, @@ -403,15 +416,18 @@ this.opts.is_nested = is_nested; this.container.addClass(this.opts._class); + + this._set_static_class(); + if (is_nested) { this.container.addClass('grid-stack-nested'); } this._init_styles(); - this.grid = new GridStackEngine(this.opts.width, function (nodes) { + this.grid = new GridStackEngine(this.opts.width, function(nodes) { var max_height = 0; - _.each(nodes, function (n) { + _.each(nodes, function(n) { if (n._id == null) { n.el.remove(); } @@ -430,25 +446,29 @@ if (this.opts.auto) { var elements = []; var _this = this; - this.container.children('.' + this.opts.item_class).each(function (index, el) { + this.container.children('.' + this.opts.item_class).each(function(index, el) { el = $(el); elements.push({ el: el, - i: parseInt(el.attr('data-gs-x')) + parseInt(el.attr('data-gs-y')) * _this.opts.width // Use opts.width as weight for Y + i: parseInt(el.attr('data-gs-x')) + parseInt(el.attr('data-gs-y')) * _this.opts.width }); }); - _.chain(elements).sortBy(function (x) { return x.i; }).each(function (i) { + _.chain(elements).sortBy(function(x) { return x.i; }).each(function(i) { self._prepare_element(i.el); }).value(); } this.set_animation(this.opts.animate); - this.placeholder = $('
').hide(); - this.container.append(this.placeholder); - this.container.height((this.grid.get_grid_height()) * (this.opts.cell_height + this.opts.vertical_margin) - this.opts.vertical_margin); + this.placeholder = $( + '
' + + '
').hide(); - var on_resize_handler = function () { + this.container.height( + this.grid.get_grid_height() * (this.opts.cell_height + this.opts.vertical_margin) - + this.opts.vertical_margin); + + this.on_resize_handler = function() { if (self._is_one_column_mode()) { if (one_column_mode) return; @@ -456,9 +476,12 @@ one_column_mode = true; self.grid._sort_nodes(); - _.each(self.grid.nodes, function (node) { + _.each(self.grid.nodes, function(node) { self.container.append(node.el); + if (self.opts.static_grid) { + return; + } if (!node.no_move) { node.el.draggable('disable'); } @@ -473,7 +496,11 @@ one_column_mode = false; - _.each(self.grid.nodes, function (node) { + if (self.opts.static_grid) { + return; + } + + _.each(self.grid.nodes, function(node) { if (!node.no_move) { node.el.draggable('enable'); } @@ -484,11 +511,26 @@ } }; - $(window).resize(on_resize_handler); - on_resize_handler(); + $(window).resize(this.on_resize_handler); + this.on_resize_handler(); + }; + + GridStack.prototype._trigger_change_event = function(forceTrigger) { + var elements = this.grid.get_dirty_nodes(); + var hasChanges = false; + + var eventParams = []; + if (elements && elements.length) { + eventParams.push(elements); + hasChanges = true; + } + + if (hasChanges || forceTrigger === true) { + this.container.trigger('change', eventParams); + } }; - GridStack.prototype._init_styles = function () { + GridStack.prototype._init_styles = function() { if (this._styles_id) { $('[data-gs-id="' + this._styles_id + '"]').remove(); } @@ -498,7 +540,7 @@ this._styles._max = 0; }; - GridStack.prototype._update_styles = function (max_height) { + GridStack.prototype._update_styles = function(max_height) { if (this._styles == null) { return; } @@ -542,18 +584,21 @@ } }; - GridStack.prototype._update_container_height = function () { + GridStack.prototype._update_container_height = function() { if (this.grid._update_counter) { return; } - this.container.height(this.grid.get_grid_height() * (this.opts.cell_height + this.opts.vertical_margin) - this.opts.vertical_margin); + this.container.height( + this.grid.get_grid_height() * (this.opts.cell_height + this.opts.vertical_margin) - + this.opts.vertical_margin); }; - GridStack.prototype._is_one_column_mode = function () { - return $(window).width() <= this.opts.min_width; + GridStack.prototype._is_one_column_mode = function() { + return (window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth) <= + this.opts.min_width; }; - GridStack.prototype._prepare_element = function (el) { + GridStack.prototype._prepare_element = function(el) { var self = this; el = $(el); @@ -576,9 +621,14 @@ }); el.data('_gridstack_node', node); + if (self.opts.static_grid) { + return; + } + var cell_width, cell_height; - var on_start_moving = function (event, ui) { + var on_start_moving = function(event, ui) { + self.container.append(self.placeholder); var o = $(this); self.grid.clean_nodes(); self.grid.begin_update(node); @@ -596,7 +646,8 @@ el.resizable('option', 'minHeight', self.opts.cell_height * (node.min_height || 1)); }; - var on_end_moving = function (event, ui) { + var on_end_moving = function(event, ui) { + self.placeholder.detach(); var o = $(this); node.el = o; self.placeholder.hide(); @@ -607,7 +658,7 @@ .attr('data-gs-height', node.height) .removeAttr('style'); self._update_container_height(); - self.container.trigger('change', [self.grid.get_dirty_nodes()]); + self._trigger_change_event(); self.grid.end_update(); }; @@ -615,9 +666,9 @@ el.draggable(_.extend(this.opts.draggable, { start: on_start_moving, stop: on_end_moving, - drag: function (event, ui) { + drag: function(event, ui) { var x = Math.round(ui.position.left / cell_width), - y = Math.floor((ui.position.top + cell_height/2) / cell_height); + y = Math.floor((ui.position.top + cell_height / 2) / cell_height); if (!self.grid.can_move_node(node, x, y, node.width, node.height)) { return; } @@ -628,9 +679,9 @@ })).resizable(_.extend(this.opts.resizable, { start: on_start_moving, stop: on_end_moving, - resize: function (event, ui) { + resize: function(event, ui) { var x = Math.round(ui.position.left / cell_width), - y = Math.floor((ui.position.top + cell_height/2) / cell_height), + y = Math.floor((ui.position.top + cell_height / 2) / cell_height), width = Math.round(ui.size.width / cell_width), height = Math.round(ui.size.height / cell_height); if (!self.grid.can_move_node(node, x, y, width, height)) { @@ -652,7 +703,7 @@ el.attr('data-gs-locked', node.locked ? 'yes' : null); }; - GridStack.prototype.set_animation = function (enable) { + GridStack.prototype.set_animation = function(enable) { if (enable) { this.container.addClass('grid-stack-animate'); } @@ -661,7 +712,7 @@ } }; - GridStack.prototype.add_widget = function (el, x, y, width, height, auto_position) { + GridStack.prototype.add_widget = function(el, x, y, width, height, auto_position) { el = $(el); if (typeof x != 'undefined') el.attr('data-gs-x', x); if (typeof y != 'undefined') el.attr('data-gs-y', y); @@ -671,16 +722,17 @@ this.container.append(el); this._prepare_element(el); this._update_container_height(); + this._trigger_change_event(true); return el; }; - GridStack.prototype.will_it_fit = function (x, y, width, height, auto_position) { + GridStack.prototype.will_it_fit = function(x, y, width, height, auto_position) { var node = {x: x, y: y, width: width, height: height, auto_position: auto_position}; return this.grid.can_be_placed_with_respect_to_height(node); }; - GridStack.prototype.remove_widget = function (el, detach_node) { + GridStack.prototype.remove_widget = function(el, detach_node) { detach_node = typeof detach_node === 'undefined' ? true : detach_node; el = $(el); var node = el.data('_gridstack_node'); @@ -689,19 +741,29 @@ this._update_container_height(); if (detach_node) el.remove(); + this._trigger_change_event(true); }; - GridStack.prototype.remove_all = function (detach_node) { - _.each(this.grid.nodes, function (node) { + GridStack.prototype.remove_all = function(detach_node) { + _.each(this.grid.nodes, function(node) { this.remove_widget(node.el, detach_node); }, this); this.grid.nodes = []; this._update_container_height(); }; - GridStack.prototype.resizable = function (el, val) { + GridStack.prototype.destroy = function() { + $(window).off("resize", this.on_resize_handler); + this.disable(); + this.container.remove(); + Utils.remove_stylesheet(this._styles_id); + if (this.grid) + this.grid = null; + }; + + GridStack.prototype.resizable = function(el, val) { el = $(el); - el.each(function (index, el) { + el.each(function(index, el) { el = $(el); var node = el.data('_gridstack_node'); if (typeof node == 'undefined' || node == null) { @@ -719,9 +781,9 @@ return this; }; - GridStack.prototype.movable = function (el, val) { + GridStack.prototype.movable = function(el, val) { el = $(el); - el.each(function (index, el) { + el.each(function(index, el) { el = $(el); var node = el.data('_gridstack_node'); if (typeof node == 'undefined' || node == null) { @@ -739,19 +801,19 @@ return this; }; - GridStack.prototype.disable = function () { + GridStack.prototype.disable = function() { this.movable(this.container.children('.' + this.opts.item_class), false); this.resizable(this.container.children('.' + this.opts.item_class), false); }; - GridStack.prototype.enable = function () { + GridStack.prototype.enable = function() { this.movable(this.container.children('.' + this.opts.item_class), true); this.resizable(this.container.children('.' + this.opts.item_class), true); }; - GridStack.prototype.locked = function (el, val) { + GridStack.prototype.locked = function(el, val) { el = $(el); - el.each(function (index, el) { + el.each(function(index, el) { el = $(el); var node = el.data('_gridstack_node'); if (typeof node == 'undefined' || node == null) { @@ -764,7 +826,41 @@ return this; }; - GridStack.prototype._update_element = function (el, callback) { + GridStack.prototype.min_height = function (el, val) { + el = $(el); + el.each(function (index, el) { + el = $(el); + var node = el.data('_gridstack_node'); + if (typeof node == 'undefined' || node == null) { + return; + } + + if(!isNaN(val)){ + node.min_height = (val || false); + el.attr('data-gs-min-height', val); + } + }); + return this; + }; + + GridStack.prototype.min_width = function (el, val) { + el = $(el); + el.each(function (index, el) { + el = $(el); + var node = el.data('_gridstack_node'); + if (typeof node == 'undefined' || node == null) { + return; + } + + if(!isNaN(val)){ + node.min_width = (val || false); + el.attr('data-gs-min-width', val); + } + }); + return this; + }; + + GridStack.prototype._update_element = function(el, callback) { el = $(el).first(); var node = el.data('_gridstack_node'); if (typeof node == 'undefined' || node == null) { @@ -779,13 +875,13 @@ callback.call(this, el, node); self._update_container_height(); - self.container.trigger('change', [self.grid.get_dirty_nodes()]); + self._trigger_change_event(); self.grid.end_update(); }; - GridStack.prototype.resize = function (el, width, height) { - this._update_element(el, function (el, node) { + GridStack.prototype.resize = function(el, width, height) { + this._update_element(el, function(el, node) { width = (width != null && typeof width != 'undefined') ? width : node.width; height = (height != null && typeof height != 'undefined') ? height : node.height; @@ -793,8 +889,8 @@ }); }; - GridStack.prototype.move = function (el, x, y) { - this._update_element(el, function (el, node) { + GridStack.prototype.move = function(el, x, y) { + this._update_element(el, function(el, node) { x = (x != null && typeof x != 'undefined') ? x : node.x; y = (y != null && typeof y != 'undefined') ? y : node.y; @@ -802,8 +898,8 @@ }); }; - GridStack.prototype.update = function (el, x, y, width, height) { - this._update_element(el, function (el, node) { + GridStack.prototype.update = function(el, x, y, width, height) { + this._update_element(el, function(el, node) { x = (x != null && typeof x != 'undefined') ? x : node.x; y = (y != null && typeof y != 'undefined') ? y : node.y; width = (width != null && typeof width != 'undefined') ? width : node.width; @@ -813,7 +909,7 @@ }); }; - GridStack.prototype.cell_height = function (val) { + GridStack.prototype.cell_height = function(val) { if (typeof val == 'undefined') { return this.opts.cell_height; } @@ -824,7 +920,7 @@ this._update_styles(); }; - GridStack.prototype.cell_width = function () { + GridStack.prototype.cell_width = function() { var o = this.container.children('.' + this.opts.item_class).first(); return Math.ceil(o.outerWidth() / o.attr('data-gs-width')); }; @@ -840,25 +936,40 @@ return {x: Math.floor(relativeLeft / column_width), y: Math.floor(relativeTop / row_height)}; }; - GridStack.prototype.batch_update = function () { + GridStack.prototype.batch_update = function() { this.grid.batch_update(); }; - GridStack.prototype.commit = function () { + GridStack.prototype.commit = function() { this.grid.commit(); - this._update_container_height() + this._update_container_height(); }; - GridStack.prototype.is_area_empty = function (x, y, width, height) { + GridStack.prototype.is_area_empty = function(x, y, width, height) { return this.grid.is_area_empty(x, y, width, height); }; + GridStack.prototype.set_static = function(static_value) { + this.opts.static_grid = (static_value === true); + this._set_static_class(); + }; + + GridStack.prototype._set_static_class = function() { + var static_class_name = 'grid-stack-static'; + + if (this.opts.static_grid === true) { + this.container.addClass(static_class_name); + } else { + this.container.removeClass(static_class_name); + } + }; + scope.GridStackUI = GridStack; scope.GridStackUI.Utils = Utils; - $.fn.gridstack = function (opts) { - return this.each(function () { + $.fn.gridstack = function(opts) { + return this.each(function() { if (!$(this).data('gridstack')) { $(this).data('gridstack', new GridStack(this, opts)); } diff --git a/dist/gridstack.min.js b/dist/gridstack.min.js index d355e38..94f2702 100644 --- a/dist/gridstack.min.js +++ b/dist/gridstack.min.js @@ -1,2 +1,2 @@ -!function(t){"function"==typeof define&&define.amd?define(["jquery","lodash"],t):t(jQuery,_)}(function(t,e){var i=window,n={is_intercepted:function(t,e){return!(t.x+t.width<=e.x||e.x+e.width<=t.x||t.y+t.height<=e.y||e.y+e.height<=t.y)},sort:function(t,i,n){return n=n||e.chain(t).map(function(t){return t.x+t.width}).max().value(),i=-1!=i?1:-1,e.sortBy(t,function(t){return i*(t.x+t.y*n)})},create_stylesheet:function(t){var e=document.createElement("style");return e.setAttribute("type","text/css"),e.setAttribute("data-gs-id",t),e.styleSheet?e.styleSheet.cssText="":e.appendChild(document.createTextNode("")),document.getElementsByTagName("head")[0].appendChild(e),e.sheet},insert_css_rule:function(t,e,i,n){"function"==typeof t.insertRule?t.insertRule(e+"{"+i+"}",n):"function"==typeof t.addRule&&t.addRule(e,i,n)},toBool:function(t){return"boolean"==typeof t?t:"string"==typeof t?(t=t.toLowerCase(),!(""==t||"no"==t||"false"==t||"0"==t)):Boolean(t)}},o=0,s=function(t,e,i,n,o){this.width=t,this["float"]=i||!1,this.height=n||0,this.nodes=o||[],this.onchange=e||function(){},this._update_counter=0,this._float=this["float"]};s.prototype.batch_update=function(){this._update_counter=1,this["float"]=!0},s.prototype.commit=function(){this._update_counter=0,0==this._update_counter&&(this["float"]=this._float,this._pack_nodes(),this._notify())},s.prototype._fix_collisions=function(t){this._sort_nodes(-1);var i=t,o=Boolean(e.find(this.nodes,function(t){return t.locked}));for(this["float"]||o||(i={x:0,y:t.y,width:this.width,height:t.height});;){var s=e.find(this.nodes,function(e){return e!=t&&n.is_intercepted(e,i)},this);if("undefined"==typeof s)return;this.move_node(s,s.x,t.y+t.height,s.width,s.height,!0)}},s.prototype.is_area_empty=function(t,i,o,s){var a={x:t||0,y:i||0,width:o||1,height:s||1},h=e.find(this.nodes,function(t){return n.is_intercepted(t,a)},this);return null==h},s.prototype._sort_nodes=function(t){this.nodes=n.sort(this.nodes,t,this.width)},s.prototype._pack_nodes=function(){this._sort_nodes(),this["float"]?e.each(this.nodes,function(t){if(!t._updating&&"undefined"!=typeof t._orig_y&&t.y!=t._orig_y)for(var i=t.y;i>=t._orig_y;){var o=e.chain(this.nodes).find(function(e){return t!=e&&n.is_intercepted({x:t.x,y:i,width:t.width,height:t.height},e)}).value();o||(t._dirty=!0,t.y=i),--i}},this):e.each(this.nodes,function(t,i){if(!t.locked)for(;t.y>0;){var o=t.y-1,s=0==i;if(i>0){var a=e.chain(this.nodes).take(i).find(function(e){return n.is_intercepted({x:t.x,y:o,width:t.width,height:t.height},e)}).value();s="undefined"==typeof a}if(!s)break;t._dirty=t.y!=o,t.y=o}},this)},s.prototype._prepare_node=function(t,i){return t=e.defaults(t||{},{width:1,height:1,x:0,y:0}),t.x=parseInt(""+t.x),t.y=parseInt(""+t.y),t.width=parseInt(""+t.width),t.height=parseInt(""+t.height),t.auto_position=t.auto_position||!1,t.no_resize=t.no_resize||!1,t.no_move=t.no_move||!1,t.width>this.width?t.width=this.width:t.width<1&&(t.width=1),t.height<1&&(t.height=1),t.x<0&&(t.x=0),t.x+t.width>this.width&&(i?t.width=this.width-t.x:t.x=this.width-t.width),t.y<0&&(t.y=0),t},s.prototype._notify=function(){if(!this._update_counter){var t=Array.prototype.slice.call(arguments,1).concat(this.get_dirty_nodes());t=t.concat(this.get_dirty_nodes()),this.onchange(t)}},s.prototype.clean_nodes=function(){e.each(this.nodes,function(t){t._dirty=!1})},s.prototype.get_dirty_nodes=function(){return e.filter(this.nodes,function(t){return t._dirty})},s.prototype.add_node=function(t){if(t=this._prepare_node(t),"undefined"!=typeof t.max_width&&(t.width=Math.min(t.width,t.max_width)),"undefined"!=typeof t.max_height&&(t.height=Math.min(t.height,t.max_height)),"undefined"!=typeof t.min_width&&(t.width=Math.max(t.width,t.min_width)),"undefined"!=typeof t.min_height&&(t.height=Math.max(t.height,t.min_height)),t._id=++o,t._dirty=!0,t.auto_position){this._sort_nodes();for(var i=0;;++i){var s=i%this.width,a=Math.floor(i/this.width);if(!(s+t.width>this.width||e.find(this.nodes,function(e){return n.is_intercepted({x:s,y:a,width:t.width,height:t.height},e)}))){t.x=s,t.y=a;break}}}return this.nodes.push(t),this._fix_collisions(t),this._pack_nodes(),this._notify(),t},s.prototype.remove_node=function(t){t._id=null,this.nodes=e.without(this.nodes,t),this._pack_nodes(),this._notify(t)},s.prototype.can_move_node=function(i,n,o,a,h){var d=Boolean(e.find(this.nodes,function(t){return t.locked}));if(!this.height&&!d)return!0;var r,_=new s(this.width,null,this["float"],0,e.map(this.nodes,function(e){return e==i?r=t.extend({},e):t.extend({},e)}));_.move_node(r,n,o,a,h);var l=!0;return d&&(l&=!Boolean(e.find(_.nodes,function(t){return t!=r&&Boolean(t.locked)&&Boolean(t._dirty)}))),this.height&&(l&=_.get_grid_height()<=this.height),l},s.prototype.can_be_placed_with_respect_to_height=function(i){if(!this.height)return!0;var n=new s(this.width,null,this["float"],0,e.map(this.nodes,function(e){return t.extend({},e)}));return n.add_node(i),n.get_grid_height()<=this.height},s.prototype.move_node=function(t,e,i,n,o,s){if("number"!=typeof e&&(e=t.x),"number"!=typeof i&&(i=t.y),"number"!=typeof n&&(n=t.width),"number"!=typeof o&&(o=t.height),"undefined"!=typeof t.max_width&&(n=Math.min(n,t.max_width)),"undefined"!=typeof t.max_height&&(o=Math.min(o,t.max_height)),"undefined"!=typeof t.min_width&&(n=Math.max(n,t.min_width)),"undefined"!=typeof t.min_height&&(o=Math.max(o,t.min_height)),t.x==e&&t.y==i&&t.width==n&&t.height==o)return t;var a=t.width!=n;return t._dirty=!0,t.x=e,t.y=i,t.width=n,t.height=o,t=this._prepare_node(t,a),this._fix_collisions(t),s||(this._pack_nodes(),this._notify()),t},s.prototype.get_grid_height=function(){return e.reduce(this.nodes,function(t,e){return Math.max(t,e.y+e.height)},0)},s.prototype.begin_update=function(t){e.each(this.nodes,function(t){t._orig_y=t.y}),t._updating=!0},s.prototype.end_update=function(){e.each(this.nodes,function(t){t._orig_y=t.y});var t=e.find(this.nodes,function(t){return t._updating});t&&(t._updating=!1)};var a=function(i,n){var o,a=this;this.container=t(i),n.item_class=n.item_class||"grid-stack-item";var h=this.container.closest("."+n.item_class).size()>0;if(this.opts=e.defaults(n||{},{width:parseInt(this.container.attr("data-gs-width"))||12,height:parseInt(this.container.attr("data-gs-height"))||0,item_class:"grid-stack-item",placeholder_class:"grid-stack-placeholder",handle:".grid-stack-item-content",cell_height:60,vertical_margin:20,auto:!0,min_width:768,"float":!1,_class:"grid-stack-"+(1e4*Math.random()).toFixed(0),animate:Boolean(this.container.attr("data-gs-animate"))||!1,always_show_resize_handle:n.always_show_resize_handle||!1,resizable:e.defaults(n.resizable||{},{autoHide:!n.always_show_resize_handle,handles:"se"}),draggable:e.defaults(n.draggable||{},{handle:".grid-stack-item-content",scroll:!1,appendTo:"body"})}),this.opts.is_nested=h,this.container.addClass(this.opts._class),h&&this.container.addClass("grid-stack-nested"),this._init_styles(),this.grid=new s(this.opts.width,function(t){var i=0;e.each(t,function(t){null==t._id?t.el.remove():(t.el.attr("data-gs-x",t.x).attr("data-gs-y",t.y).attr("data-gs-width",t.width).attr("data-gs-height",t.height),i=Math.max(i,t.y+t.height))}),a._update_styles(i+10)},this.opts["float"],this.opts.height),this.opts.auto){var d=[],r=this;this.container.children("."+this.opts.item_class).each(function(e,i){i=t(i),d.push({el:i,i:parseInt(i.attr("data-gs-x"))+parseInt(i.attr("data-gs-y"))*r.opts.width})}),e.chain(d).sortBy(function(t){return t.i}).each(function(t){a._prepare_element(t.el)}).value()}this.set_animation(this.opts.animate),this.placeholder=t('
').hide(),this.container.append(this.placeholder),this.container.height(this.grid.get_grid_height()*(this.opts.cell_height+this.opts.vertical_margin)-this.opts.vertical_margin);var _=function(){if(a._is_one_column_mode()){if(o)return;o=!0,a.grid._sort_nodes(),e.each(a.grid.nodes,function(t){a.container.append(t.el),t.no_move||t.el.draggable("disable"),t.no_resize||t.el.resizable("disable")})}else{if(!o)return;o=!1,e.each(a.grid.nodes,function(t){t.no_move||t.el.draggable("enable"),t.no_resize||t.el.resizable("enable")})}};t(window).resize(_),_()};return a.prototype._init_styles=function(){this._styles_id&&t('[data-gs-id="'+this._styles_id+'"]').remove(),this._styles_id="gridstack-style-"+(1e5*Math.random()).toFixed(),this._styles=n.create_stylesheet(this._styles_id),null!=this._styles&&(this._styles._max=0)},a.prototype._update_styles=function(t){if(null!=this._styles){var e="."+this.opts._class+" ."+this.opts.item_class;if("undefined"==typeof t&&(t=this._styles._max,this._init_styles(),this._update_container_height()),0==this._styles._max&&n.insert_css_rule(this._styles,e,"min-height: "+this.opts.cell_height+"px;",0),t>this._styles._max){for(var i=this._styles._max;t>i;++i)n.insert_css_rule(this._styles,e+'[data-gs-height="'+(i+1)+'"]',"height: "+(this.opts.cell_height*(i+1)+this.opts.vertical_margin*i)+"px;",i),n.insert_css_rule(this._styles,e+'[data-gs-min-height="'+(i+1)+'"]',"min-height: "+(this.opts.cell_height*(i+1)+this.opts.vertical_margin*i)+"px;",i),n.insert_css_rule(this._styles,e+'[data-gs-max-height="'+(i+1)+'"]',"max-height: "+(this.opts.cell_height*(i+1)+this.opts.vertical_margin*i)+"px;",i),n.insert_css_rule(this._styles,e+'[data-gs-y="'+i+'"]',"top: "+(this.opts.cell_height*i+this.opts.vertical_margin*i)+"px;",i);this._styles._max=t}}},a.prototype._update_container_height=function(){this.grid._update_counter||this.container.height(this.grid.get_grid_height()*(this.opts.cell_height+this.opts.vertical_margin)-this.opts.vertical_margin)},a.prototype._is_one_column_mode=function(){return t(window).width()<=this.opts.min_width},a.prototype._prepare_element=function(i){var o=this;i=t(i),i.addClass(this.opts.item_class);var s=o.grid.add_node({x:i.attr("data-gs-x"),y:i.attr("data-gs-y"),width:i.attr("data-gs-width"),height:i.attr("data-gs-height"),max_width:i.attr("data-gs-max-width"),min_width:i.attr("data-gs-min-width"),max_height:i.attr("data-gs-max-height"),min_height:i.attr("data-gs-min-height"),auto_position:n.toBool(i.attr("data-gs-auto-position")),no_resize:n.toBool(i.attr("data-gs-no-resize")),no_move:n.toBool(i.attr("data-gs-no-move")),locked:n.toBool(i.attr("data-gs-locked")),el:i});i.data("_gridstack_node",s);var a,h,d=function(){var e=t(this);o.grid.clean_nodes(),o.grid.begin_update(s),a=Math.ceil(e.outerWidth()/e.attr("data-gs-width")),h=o.opts.cell_height+o.opts.vertical_margin,o.placeholder.attr("data-gs-x",e.attr("data-gs-x")).attr("data-gs-y",e.attr("data-gs-y")).attr("data-gs-width",e.attr("data-gs-width")).attr("data-gs-height",e.attr("data-gs-height")).show(),s.el=o.placeholder,i.resizable("option","minWidth",a*(s.min_width||1)),i.resizable("option","minHeight",o.opts.cell_height*(s.min_height||1))},r=function(){var e=t(this);s.el=e,o.placeholder.hide(),e.attr("data-gs-x",s.x).attr("data-gs-y",s.y).attr("data-gs-width",s.width).attr("data-gs-height",s.height).removeAttr("style"),o._update_container_height(),o.container.trigger("change",[o.grid.get_dirty_nodes()]),o.grid.end_update()};i.draggable(e.extend(this.opts.draggable,{start:d,stop:r,drag:function(t,e){var i=Math.round(e.position.left/a),n=Math.floor((e.position.top+h/2)/h);o.grid.can_move_node(s,i,n,s.width,s.height)&&(o.grid.move_node(s,i,n),o._update_container_height())},containment:this.opts.is_nested?this.container.parent():null})).resizable(e.extend(this.opts.resizable,{start:d,stop:r,resize:function(t,e){var i=Math.round(e.position.left/a),n=Math.floor((e.position.top+h/2)/h),d=Math.round(e.size.width/a),r=Math.round(e.size.height/h);o.grid.can_move_node(s,i,n,d,r)&&(o.grid.move_node(s,i,n,d,r),o._update_container_height())}})),(s.no_move||this._is_one_column_mode())&&i.draggable("disable"),(s.no_resize||this._is_one_column_mode())&&i.resizable("disable"),i.attr("data-gs-locked",s.locked?"yes":null)},a.prototype.set_animation=function(t){t?this.container.addClass("grid-stack-animate"):this.container.removeClass("grid-stack-animate")},a.prototype.add_widget=function(e,i,n,o,s,a){return e=t(e),"undefined"!=typeof i&&e.attr("data-gs-x",i),"undefined"!=typeof n&&e.attr("data-gs-y",n),"undefined"!=typeof o&&e.attr("data-gs-width",o),"undefined"!=typeof s&&e.attr("data-gs-height",s),"undefined"!=typeof a&&e.attr("data-gs-auto-position",a?"yes":null),this.container.append(e),this._prepare_element(e),this._update_container_height(),e},a.prototype.will_it_fit=function(t,e,i,n,o){var s={x:t,y:e,width:i,height:n,auto_position:o};return this.grid.can_be_placed_with_respect_to_height(s)},a.prototype.remove_widget=function(e,i){i="undefined"==typeof i?!0:i,e=t(e);var n=e.data("_gridstack_node");this.grid.remove_node(n),e.removeData("_gridstack_node"),this._update_container_height(),i&&e.remove()},a.prototype.remove_all=function(t){e.each(this.grid.nodes,function(e){this.remove_widget(e.el,t)},this),this.grid.nodes=[],this._update_container_height()},a.prototype.resizable=function(e,i){return e=t(e),e.each(function(e,n){n=t(n);var o=n.data("_gridstack_node");"undefined"!=typeof o&&null!=o&&(o.no_resize=!i,n.resizable(o.no_resize?"disable":"enable"))}),this},a.prototype.movable=function(e,i){return e=t(e),e.each(function(e,n){n=t(n);var o=n.data("_gridstack_node");"undefined"!=typeof o&&null!=o&&(o.no_move=!i,n.draggable(o.no_move?"disable":"enable"))}),this},a.prototype.disable=function(){this.movable(this.container.children("."+this.opts.item_class),!1),this.resizable(this.container.children("."+this.opts.item_class),!1)},a.prototype.enable=function(){this.movable(this.container.children("."+this.opts.item_class),!0),this.resizable(this.container.children("."+this.opts.item_class),!0)},a.prototype.locked=function(e,i){return e=t(e),e.each(function(e,n){n=t(n);var o=n.data("_gridstack_node");"undefined"!=typeof o&&null!=o&&(o.locked=i||!1,n.attr("data-gs-locked",o.locked?"yes":null))}),this},a.prototype._update_element=function(e,i){e=t(e).first();var n=e.data("_gridstack_node");if("undefined"!=typeof n&&null!=n){var o=this;o.grid.clean_nodes(),o.grid.begin_update(n),i.call(this,e,n),o._update_container_height(),o.container.trigger("change",[o.grid.get_dirty_nodes()]),o.grid.end_update()}},a.prototype.resize=function(t,e,i){this._update_element(t,function(t,n){e=null!=e&&"undefined"!=typeof e?e:n.width,i=null!=i&&"undefined"!=typeof i?i:n.height,this.grid.move_node(n,n.x,n.y,e,i)})},a.prototype.move=function(t,e,i){this._update_element(t,function(t,n){e=null!=e&&"undefined"!=typeof e?e:n.x,i=null!=i&&"undefined"!=typeof i?i:n.y,this.grid.move_node(n,e,i,n.width,n.height)})},a.prototype.update=function(t,e,i,n,o){this._update_element(t,function(t,s){e=null!=e&&"undefined"!=typeof e?e:s.x,i=null!=i&&"undefined"!=typeof i?i:s.y,n=null!=n&&"undefined"!=typeof n?n:s.width,o=null!=o&&"undefined"!=typeof o?o:s.height,this.grid.move_node(s,e,i,n,o)})},a.prototype.cell_height=function(t){return"undefined"==typeof t?this.opts.cell_height:(t=parseInt(t),void(t!=this.opts.cell_height&&(this.opts.cell_height=t||this.opts.cell_height,this._update_styles())))},a.prototype.cell_width=function(){var t=this.container.children("."+this.opts.item_class).first();return Math.ceil(t.outerWidth()/t.attr("data-gs-width"))},a.prototype.get_cell_from_pixel=function(t){var e=this.container.position(),i=t.left-e.left,n=t.top-e.top,o=Math.floor(this.container.width()/this.opts.width),s=this.opts.cell_height+this.opts.vertical_margin;return{x:Math.floor(i/o),y:Math.floor(n/s)}},a.prototype.batch_update=function(){this.grid.batch_update()},a.prototype.commit=function(){this.grid.commit(),this._update_container_height()},a.prototype.is_area_empty=function(t,e,i,n){return this.grid.is_area_empty(t,e,i,n)},i.GridStackUI=a,i.GridStackUI.Utils=n,t.fn.gridstack=function(e){return this.each(function(){t(this).data("gridstack")||t(this).data("gridstack",new a(this,e))})},i.GridStackUI}); +!function(t){"function"==typeof define&&define.amd?define(["jquery","lodash","jquery-ui/core","jquery-ui/widget","jquery-ui/mouse","jquery-ui/draggable","jquery-ui/resizable"],t):t(jQuery,_)}(function(t,e){var i=window,n={is_intercepted:function(t,e){return!(t.x+t.width<=e.x||e.x+e.width<=t.x||t.y+t.height<=e.y||e.y+e.height<=t.y)},sort:function(t,i,n){return n=n||e.chain(t).map(function(t){return t.x+t.width}).max().value(),i=-1!=i?1:-1,e.sortBy(t,function(t){return i*(t.x+t.y*n)})},create_stylesheet:function(t){var e=document.createElement("style");return e.setAttribute("type","text/css"),e.setAttribute("data-gs-id",t),e.styleSheet?e.styleSheet.cssText="":e.appendChild(document.createTextNode("")),document.getElementsByTagName("head")[0].appendChild(e),e.sheet},remove_stylesheet:function(e){t("STYLE[data-gs-id="+e+"]").remove()},insert_css_rule:function(t,e,i,n){"function"==typeof t.insertRule?t.insertRule(e+"{"+i+"}",n):"function"==typeof t.addRule&&t.addRule(e,i,n)},toBool:function(t){return"boolean"==typeof t?t:"string"==typeof t?(t=t.toLowerCase(),!(""==t||"no"==t||"false"==t||"0"==t)):Boolean(t)}},s=0,o=function(t,e,i,n,s){this.width=t,this["float"]=i||!1,this.height=n||0,this.nodes=s||[],this.onchange=e||function(){},this._update_counter=0,this._float=this["float"]};o.prototype.batch_update=function(){this._update_counter=1,this["float"]=!0},o.prototype.commit=function(){this._update_counter=0,0==this._update_counter&&(this["float"]=this._float,this._pack_nodes(),this._notify())},o.prototype._fix_collisions=function(t){this._sort_nodes(-1);var i=t,s=Boolean(e.find(this.nodes,function(t){return t.locked}));for(this["float"]||s||(i={x:0,y:t.y,width:this.width,height:t.height});;){var o=e.find(this.nodes,function(e){return e!=t&&n.is_intercepted(e,i)},this);if("undefined"==typeof o)return;this.move_node(o,o.x,t.y+t.height,o.width,o.height,!0)}},o.prototype.is_area_empty=function(t,i,s,o){var a={x:t||0,y:i||0,width:s||1,height:o||1},h=e.find(this.nodes,function(t){return n.is_intercepted(t,a)},this);return null==h},o.prototype._sort_nodes=function(t){this.nodes=n.sort(this.nodes,t,this.width)},o.prototype._pack_nodes=function(){this._sort_nodes(),this["float"]?e.each(this.nodes,function(t,i){if(!t._updating&&"undefined"!=typeof t._orig_y&&t.y!=t._orig_y)for(var s=t.y;s>=t._orig_y;){var o=e.chain(this.nodes).find(function(e){return t!=e&&n.is_intercepted({x:t.x,y:s,width:t.width,height:t.height},e)}).value();o||(t._dirty=!0,t.y=s),--s}},this):e.each(this.nodes,function(t,i){if(!t.locked)for(;t.y>0;){var s=t.y-1,o=0==i;if(i>0){var a=e.chain(this.nodes).take(i).find(function(e){return n.is_intercepted({x:t.x,y:s,width:t.width,height:t.height},e)}).value();o="undefined"==typeof a}if(!o)break;t._dirty=t.y!=s,t.y=s}},this)},o.prototype._prepare_node=function(t,i){return t=e.defaults(t||{},{width:1,height:1,x:0,y:0}),t.x=parseInt(""+t.x),t.y=parseInt(""+t.y),t.width=parseInt(""+t.width),t.height=parseInt(""+t.height),t.auto_position=t.auto_position||!1,t.no_resize=t.no_resize||!1,t.no_move=t.no_move||!1,t.width>this.width?t.width=this.width:t.width<1&&(t.width=1),t.height<1&&(t.height=1),t.x<0&&(t.x=0),t.x+t.width>this.width&&(i?t.width=this.width-t.x:t.x=this.width-t.width),t.y<0&&(t.y=0),t},o.prototype._notify=function(){if(!this._update_counter){var t=Array.prototype.slice.call(arguments,1).concat(this.get_dirty_nodes());t=t.concat(this.get_dirty_nodes()),this.onchange(t)}},o.prototype.clean_nodes=function(){e.each(this.nodes,function(t){t._dirty=!1})},o.prototype.get_dirty_nodes=function(){return e.filter(this.nodes,function(t){return t._dirty})},o.prototype.add_node=function(t){if(t=this._prepare_node(t),"undefined"!=typeof t.max_width&&(t.width=Math.min(t.width,t.max_width)),"undefined"!=typeof t.max_height&&(t.height=Math.min(t.height,t.max_height)),"undefined"!=typeof t.min_width&&(t.width=Math.max(t.width,t.min_width)),"undefined"!=typeof t.min_height&&(t.height=Math.max(t.height,t.min_height)),t._id=++s,t._dirty=!0,t.auto_position){this._sort_nodes();for(var i=0;;++i){var o=i%this.width,a=Math.floor(i/this.width);if(!(o+t.width>this.width||e.find(this.nodes,function(e){return n.is_intercepted({x:o,y:a,width:t.width,height:t.height},e)}))){t.x=o,t.y=a;break}}}return this.nodes.push(t),this._fix_collisions(t),this._pack_nodes(),this._notify(),t},o.prototype.remove_node=function(t){t._id=null,this.nodes=e.without(this.nodes,t),this._pack_nodes(),this._notify(t)},o.prototype.can_move_node=function(i,n,s,a,h){var r=Boolean(e.find(this.nodes,function(t){return t.locked}));if(!this.height&&!r)return!0;var d,_=new o(this.width,null,this["float"],0,e.map(this.nodes,function(e){return e==i?d=t.extend({},e):t.extend({},e)}));_.move_node(d,n,s,a,h);var l=!0;return r&&(l&=!Boolean(e.find(_.nodes,function(t){return t!=d&&Boolean(t.locked)&&Boolean(t._dirty)}))),this.height&&(l&=_.get_grid_height()<=this.height),l},o.prototype.can_be_placed_with_respect_to_height=function(i){if(!this.height)return!0;var n=new o(this.width,null,this["float"],0,e.map(this.nodes,function(e){return t.extend({},e)}));return n.add_node(i),n.get_grid_height()<=this.height},o.prototype.move_node=function(t,e,i,n,s,o){if("number"!=typeof e&&(e=t.x),"number"!=typeof i&&(i=t.y),"number"!=typeof n&&(n=t.width),"number"!=typeof s&&(s=t.height),"undefined"!=typeof t.max_width&&(n=Math.min(n,t.max_width)),"undefined"!=typeof t.max_height&&(s=Math.min(s,t.max_height)),"undefined"!=typeof t.min_width&&(n=Math.max(n,t.min_width)),"undefined"!=typeof t.min_height&&(s=Math.max(s,t.min_height)),t.x==e&&t.y==i&&t.width==n&&t.height==s)return t;var a=t.width!=n;return t._dirty=!0,t.x=e,t.y=i,t.width=n,t.height=s,t=this._prepare_node(t,a),this._fix_collisions(t),o||(this._pack_nodes(),this._notify()),t},o.prototype.get_grid_height=function(){return e.reduce(this.nodes,function(t,e){return Math.max(t,e.y+e.height)},0)},o.prototype.begin_update=function(t){e.each(this.nodes,function(t){t._orig_y=t.y}),t._updating=!0},o.prototype.end_update=function(){e.each(this.nodes,function(t){t._orig_y=t.y});var t=e.find(this.nodes,function(t){return t._updating});t&&(t._updating=!1)};var a=function(i,n){var s,a=this;this.container=t(i),n.item_class=n.item_class||"grid-stack-item";var h=this.container.closest("."+n.item_class).size()>0;if(this.opts=e.defaults(n||{},{width:parseInt(this.container.attr("data-gs-width"))||12,height:parseInt(this.container.attr("data-gs-height"))||0,item_class:"grid-stack-item",placeholder_class:"grid-stack-placeholder",handle:".grid-stack-item-content",cell_height:60,vertical_margin:20,auto:!0,min_width:768,"float":!1,static_grid:!1,_class:"grid-stack-"+(1e4*Math.random()).toFixed(0),animate:Boolean(this.container.attr("data-gs-animate"))||!1,always_show_resize_handle:n.always_show_resize_handle||!1,resizable:e.defaults(n.resizable||{},{autoHide:!n.always_show_resize_handle,handles:"se"}),draggable:e.defaults(n.draggable||{},{handle:".grid-stack-item-content",scroll:!1,appendTo:"body"})}),this.opts.is_nested=h,this.container.addClass(this.opts._class),this._set_static_class(),h&&this.container.addClass("grid-stack-nested"),this._init_styles(),this.grid=new o(this.opts.width,function(t){var i=0;e.each(t,function(t){null==t._id?t.el.remove():(t.el.attr("data-gs-x",t.x).attr("data-gs-y",t.y).attr("data-gs-width",t.width).attr("data-gs-height",t.height),i=Math.max(i,t.y+t.height))}),a._update_styles(i+10)},this.opts["float"],this.opts.height),this.opts.auto){var r=[],d=this;this.container.children("."+this.opts.item_class).each(function(e,i){i=t(i),r.push({el:i,i:parseInt(i.attr("data-gs-x"))+parseInt(i.attr("data-gs-y"))*d.opts.width})}),e.chain(r).sortBy(function(t){return t.i}).each(function(t){a._prepare_element(t.el)}).value()}this.set_animation(this.opts.animate),this.placeholder=t('
').hide(),this.container.height(this.grid.get_grid_height()*(this.opts.cell_height+this.opts.vertical_margin)-this.opts.vertical_margin),this.on_resize_handler=function(){if(a._is_one_column_mode()){if(s)return;s=!0,a.grid._sort_nodes(),e.each(a.grid.nodes,function(t){a.container.append(t.el),a.opts.static_grid||(t.no_move||t.el.draggable("disable"),t.no_resize||t.el.resizable("disable"))})}else{if(!s)return;if(s=!1,a.opts.static_grid)return;e.each(a.grid.nodes,function(t){t.no_move||t.el.draggable("enable"),t.no_resize||t.el.resizable("enable")})}},t(window).resize(this.on_resize_handler),this.on_resize_handler()};return a.prototype._trigger_change_event=function(t){var e=this.grid.get_dirty_nodes(),i=!1,n=[];e&&e.length&&(n.push(e),i=!0),(i||t===!0)&&this.container.trigger("change",n)},a.prototype._init_styles=function(){this._styles_id&&t('[data-gs-id="'+this._styles_id+'"]').remove(),this._styles_id="gridstack-style-"+(1e5*Math.random()).toFixed(),this._styles=n.create_stylesheet(this._styles_id),null!=this._styles&&(this._styles._max=0)},a.prototype._update_styles=function(t){if(null!=this._styles){var e="."+this.opts._class+" ."+this.opts.item_class;if("undefined"==typeof t&&(t=this._styles._max,this._init_styles(),this._update_container_height()),0==this._styles._max&&n.insert_css_rule(this._styles,e,"min-height: "+this.opts.cell_height+"px;",0),t>this._styles._max){for(var i=this._styles._max;t>i;++i)n.insert_css_rule(this._styles,e+'[data-gs-height="'+(i+1)+'"]',"height: "+(this.opts.cell_height*(i+1)+this.opts.vertical_margin*i)+"px;",i),n.insert_css_rule(this._styles,e+'[data-gs-min-height="'+(i+1)+'"]',"min-height: "+(this.opts.cell_height*(i+1)+this.opts.vertical_margin*i)+"px;",i),n.insert_css_rule(this._styles,e+'[data-gs-max-height="'+(i+1)+'"]',"max-height: "+(this.opts.cell_height*(i+1)+this.opts.vertical_margin*i)+"px;",i),n.insert_css_rule(this._styles,e+'[data-gs-y="'+i+'"]',"top: "+(this.opts.cell_height*i+this.opts.vertical_margin*i)+"px;",i);this._styles._max=t}}},a.prototype._update_container_height=function(){this.grid._update_counter||this.container.height(this.grid.get_grid_height()*(this.opts.cell_height+this.opts.vertical_margin)-this.opts.vertical_margin)},a.prototype._is_one_column_mode=function(){return(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)<=this.opts.min_width},a.prototype._prepare_element=function(i){var s=this;i=t(i),i.addClass(this.opts.item_class);var o=s.grid.add_node({x:i.attr("data-gs-x"),y:i.attr("data-gs-y"),width:i.attr("data-gs-width"),height:i.attr("data-gs-height"),max_width:i.attr("data-gs-max-width"),min_width:i.attr("data-gs-min-width"),max_height:i.attr("data-gs-max-height"),min_height:i.attr("data-gs-min-height"),auto_position:n.toBool(i.attr("data-gs-auto-position")),no_resize:n.toBool(i.attr("data-gs-no-resize")),no_move:n.toBool(i.attr("data-gs-no-move")),locked:n.toBool(i.attr("data-gs-locked")),el:i});if(i.data("_gridstack_node",o),!s.opts.static_grid){var a,h,r=function(e,n){s.container.append(s.placeholder);var r=t(this);s.grid.clean_nodes(),s.grid.begin_update(o),a=Math.ceil(r.outerWidth()/r.attr("data-gs-width")),h=s.opts.cell_height+s.opts.vertical_margin,s.placeholder.attr("data-gs-x",r.attr("data-gs-x")).attr("data-gs-y",r.attr("data-gs-y")).attr("data-gs-width",r.attr("data-gs-width")).attr("data-gs-height",r.attr("data-gs-height")).show(),o.el=s.placeholder,i.resizable("option","minWidth",a*(o.min_width||1)),i.resizable("option","minHeight",s.opts.cell_height*(o.min_height||1))},d=function(e,i){s.placeholder.detach();var n=t(this);o.el=n,s.placeholder.hide(),n.attr("data-gs-x",o.x).attr("data-gs-y",o.y).attr("data-gs-width",o.width).attr("data-gs-height",o.height).removeAttr("style"),s._update_container_height(),s._trigger_change_event(),s.grid.end_update()};i.draggable(e.extend(this.opts.draggable,{start:r,stop:d,drag:function(t,e){var i=Math.round(e.position.left/a),n=Math.floor((e.position.top+h/2)/h);s.grid.can_move_node(o,i,n,o.width,o.height)&&(s.grid.move_node(o,i,n),s._update_container_height())},containment:this.opts.is_nested?this.container.parent():null})).resizable(e.extend(this.opts.resizable,{start:r,stop:d,resize:function(t,e){var i=Math.round(e.position.left/a),n=Math.floor((e.position.top+h/2)/h),r=Math.round(e.size.width/a),d=Math.round(e.size.height/h);s.grid.can_move_node(o,i,n,r,d)&&(s.grid.move_node(o,i,n,r,d),s._update_container_height())}})),(o.no_move||this._is_one_column_mode())&&i.draggable("disable"),(o.no_resize||this._is_one_column_mode())&&i.resizable("disable"),i.attr("data-gs-locked",o.locked?"yes":null)}},a.prototype.set_animation=function(t){t?this.container.addClass("grid-stack-animate"):this.container.removeClass("grid-stack-animate")},a.prototype.add_widget=function(e,i,n,s,o,a){return e=t(e),"undefined"!=typeof i&&e.attr("data-gs-x",i),"undefined"!=typeof n&&e.attr("data-gs-y",n),"undefined"!=typeof s&&e.attr("data-gs-width",s),"undefined"!=typeof o&&e.attr("data-gs-height",o),"undefined"!=typeof a&&e.attr("data-gs-auto-position",a?"yes":null),this.container.append(e),this._prepare_element(e),this._update_container_height(),this._trigger_change_event(!0),e},a.prototype.will_it_fit=function(t,e,i,n,s){var o={x:t,y:e,width:i,height:n,auto_position:s};return this.grid.can_be_placed_with_respect_to_height(o)},a.prototype.remove_widget=function(e,i){i="undefined"==typeof i?!0:i,e=t(e);var n=e.data("_gridstack_node");this.grid.remove_node(n),e.removeData("_gridstack_node"),this._update_container_height(),i&&e.remove(),this._trigger_change_event(!0)},a.prototype.remove_all=function(t){e.each(this.grid.nodes,function(e){this.remove_widget(e.el,t)},this),this.grid.nodes=[],this._update_container_height()},a.prototype.destroy=function(){t(window).off("resize",this.on_resize_handler),this.disable(),this.container.remove(),n.remove_stylesheet(this._styles_id),this.grid&&(this.grid=null)},a.prototype.resizable=function(e,i){return e=t(e),e.each(function(e,n){n=t(n);var s=n.data("_gridstack_node");"undefined"!=typeof s&&null!=s&&(s.no_resize=!i,s.no_resize?n.resizable("disable"):n.resizable("enable"))}),this},a.prototype.movable=function(e,i){return e=t(e),e.each(function(e,n){n=t(n);var s=n.data("_gridstack_node");"undefined"!=typeof s&&null!=s&&(s.no_move=!i,s.no_move?n.draggable("disable"):n.draggable("enable"))}),this},a.prototype.disable=function(){this.movable(this.container.children("."+this.opts.item_class),!1),this.resizable(this.container.children("."+this.opts.item_class),!1)},a.prototype.enable=function(){this.movable(this.container.children("."+this.opts.item_class),!0),this.resizable(this.container.children("."+this.opts.item_class),!0)},a.prototype.locked=function(e,i){return e=t(e),e.each(function(e,n){n=t(n);var s=n.data("_gridstack_node");"undefined"!=typeof s&&null!=s&&(s.locked=i||!1,n.attr("data-gs-locked",s.locked?"yes":null))}),this},a.prototype.min_height=function(e,i){return e=t(e),e.each(function(e,n){n=t(n);var s=n.data("_gridstack_node");"undefined"!=typeof s&&null!=s&&(isNaN(i)||(s.min_height=i||!1,n.attr("data-gs-min-height",i)))}),this},a.prototype.min_width=function(e,i){return e=t(e),e.each(function(e,n){n=t(n);var s=n.data("_gridstack_node");"undefined"!=typeof s&&null!=s&&(isNaN(i)||(s.min_width=i||!1,n.attr("data-gs-min-width",i)))}),this},a.prototype._update_element=function(e,i){e=t(e).first();var n=e.data("_gridstack_node");if("undefined"!=typeof n&&null!=n){var s=this;s.grid.clean_nodes(),s.grid.begin_update(n),i.call(this,e,n),s._update_container_height(),s._trigger_change_event(),s.grid.end_update()}},a.prototype.resize=function(t,e,i){this._update_element(t,function(t,n){e=null!=e&&"undefined"!=typeof e?e:n.width,i=null!=i&&"undefined"!=typeof i?i:n.height,this.grid.move_node(n,n.x,n.y,e,i)})},a.prototype.move=function(t,e,i){this._update_element(t,function(t,n){e=null!=e&&"undefined"!=typeof e?e:n.x,i=null!=i&&"undefined"!=typeof i?i:n.y,this.grid.move_node(n,e,i,n.width,n.height)})},a.prototype.update=function(t,e,i,n,s){this._update_element(t,function(t,o){e=null!=e&&"undefined"!=typeof e?e:o.x,i=null!=i&&"undefined"!=typeof i?i:o.y,n=null!=n&&"undefined"!=typeof n?n:o.width,s=null!=s&&"undefined"!=typeof s?s:o.height,this.grid.move_node(o,e,i,n,s)})},a.prototype.cell_height=function(t){return"undefined"==typeof t?this.opts.cell_height:(t=parseInt(t),void(t!=this.opts.cell_height&&(this.opts.cell_height=t||this.opts.cell_height,this._update_styles())))},a.prototype.cell_width=function(){var t=this.container.children("."+this.opts.item_class).first();return Math.ceil(t.outerWidth()/t.attr("data-gs-width"))},a.prototype.get_cell_from_pixel=function(t){var e=this.container.position(),i=t.left-e.left,n=t.top-e.top,s=Math.floor(this.container.width()/this.opts.width),o=this.opts.cell_height+this.opts.vertical_margin;return{x:Math.floor(i/s),y:Math.floor(n/o)}},a.prototype.batch_update=function(){this.grid.batch_update()},a.prototype.commit=function(){this.grid.commit(),this._update_container_height()},a.prototype.is_area_empty=function(t,e,i,n){return this.grid.is_area_empty(t,e,i,n)},a.prototype.set_static=function(t){this.opts.static_grid=t===!0,this._set_static_class()},a.prototype._set_static_class=function(){var t="grid-stack-static";this.opts.static_grid===!0?this.container.addClass(t):this.container.removeClass(t)},i.GridStackUI=a,i.GridStackUI.Utils=n,t.fn.gridstack=function(e){return this.each(function(){t(this).data("gridstack")||t(this).data("gridstack",new a(this,e))})},i.GridStackUI}); //# sourceMappingURL=gridstack.min.map \ No newline at end of file diff --git a/dist/gridstack.min.map b/dist/gridstack.min.map index dfc1ade..3c504f6 100644 --- a/dist/gridstack.min.map +++ b/dist/gridstack.min.map @@ -1 +1 @@ -{"version":3,"file":"dist/gridstack.min.js","sources":["src/gridstack.js"],"names":["factory","define","amd","jQuery","_","$","scope","window","Utils","is_intercepted","a","b","x","width","y","height","sort","nodes","dir","chain","map","node","max","value","sortBy","n","create_stylesheet","id","style","document","createElement","setAttribute","styleSheet","cssText","appendChild","createTextNode","getElementsByTagName","sheet","insert_css_rule","selector","rules","index","insertRule","addRule","toBool","v","toLowerCase","Boolean","id_seq","GridStackEngine","onchange","float","items","this","_update_counter","_float","prototype","batch_update","commit","_pack_nodes","_notify","_fix_collisions","_sort_nodes","nn","has_locked","find","locked","collision_node","move_node","is_area_empty","each","_updating","_orig_y","new_y","bn","_dirty","i","can_be_moved","take","_prepare_node","resizing","defaults","parseInt","auto_position","no_resize","no_move","deleted_nodes","Array","slice","call","arguments","concat","get_dirty_nodes","clean_nodes","filter","add_node","max_width","Math","min","max_height","min_width","min_height","_id","floor","push","remove_node","without","can_move_node","cloned_node","clone","extend","res","get_grid_height","can_be_placed_with_respect_to_height","no_pack","reduce","memo","begin_update","end_update","GridStack","el","opts","one_column_mode","self","container","item_class","is_nested","closest","size","attr","placeholder_class","handle","cell_height","vertical_margin","auto","_class","random","toFixed","animate","always_show_resize_handle","resizable","autoHide","handles","draggable","scroll","appendTo","addClass","_init_styles","grid","remove","_update_styles","elements","_this","children","_prepare_element","set_animation","placeholder","hide","append","on_resize_handler","_is_one_column_mode","resize","_styles_id","_styles","_max","prefix","_update_container_height","data","cell_width","on_start_moving","o","ceil","outerWidth","show","on_end_moving","removeAttr","trigger","start","stop","drag","event","ui","round","position","left","top","containment","parent","enable","removeClass","add_widget","will_it_fit","remove_widget","detach_node","removeData","remove_all","val","movable","disable","_update_element","callback","first","move","update","get_cell_from_pixel","containerPos","relativeLeft","relativeTop","column_width","row_height","GridStackUI","fn","gridstack"],"mappings":"CAKA,SAAWA,GACe,kBAAXC,SAAyBA,OAAOC,IACvCD,QAAQ,SAAU,UAAWD,GAG7BA,EAAQG,OAAQC,IAErB,SAAUC,EAAGD,GAEZ,GAAIE,GAAQC,OAERC,GACAC,eAAgB,SAAUC,EAAGC,GACzB,QAASD,EAAEE,EAAIF,EAAEG,OAASF,EAAEC,GAAKD,EAAEC,EAAID,EAAEE,OAASH,EAAEE,GAAKF,EAAEI,EAAIJ,EAAEK,QAAUJ,EAAEG,GAAKH,EAAEG,EAAIH,EAAEI,QAAUL,EAAEI,IAG1GE,KAAM,SAAUC,EAAOC,EAAKL,GAGxB,MAFAA,GAAQA,GAAST,EAAEe,MAAMF,GAAOG,IAAI,SAAUC,GAAQ,MAAOA,GAAKT,EAAIS,EAAKR,QAAUS,MAAMC,QAC3FL,EAAa,IAAPA,EAAY,EAAI,GACfd,EAAEoB,OAAOP,EAAO,SAAUQ,GAAK,MAAOP,IAAOO,EAAEb,EAAIa,EAAEX,EAAID,MAGpEa,kBAAmB,SAAUC,GACzB,GAAIC,GAAQC,SAASC,cAAc,QAUnC,OATAF,GAAMG,aAAa,OAAQ,YAC3BH,EA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4M,YAAc3F,EAEpBjH,EAAM4M,YAAY1M,MAAQA,EAE1BH,EAAE8M,GAAGC,UAAY,SAAU3F,GACvB,MAAOpE,MAAKiB,KAAK,WACRjE,EAAEgD,MAAMkH,KAAK,cACdlK,EAAEgD,MAAMkH,KAAK,YAAa,GAAIhD,GAAUlE,KAAMoE,OAKnDnH,EAAM4M"} \ No newline at end of file +{"version":3,"file":"dist/gridstack.min.js","sources":["src/gridstack.js"],"names":["factory","define","amd","jQuery","_","$","scope","window","Utils","is_intercepted","a","b","x","width","y","height","sort","nodes","dir","chain","map","node","max","value","sortBy","n","create_stylesheet","id","style","document","createElement","setAttribute","styleSheet","cssText","appendChild","createTextNode","getElementsByTagName","sheet","remove_stylesheet","remove","insert_css_rule","selector","rules","index","insertRule","addRule","toBool","v","toLowerCase","Boolean","id_seq","GridStackEngine","onchange","float_mode","items","this","_update_counter","_float","prototype","batch_update","commit","_pack_nodes","_notify","_fix_collisions","_sort_nodes","nn","has_locked","find","locked","collision_node","move_node","is_area_empty","each","i","_updating","_orig_y","new_y","bn","_dirty","can_be_moved","take","_prepare_node","resizing","defaults","parseInt","auto_position","no_resize","no_move","deleted_nodes","Array","slice","call","arguments","concat","get_dirty_nodes","clean_nodes","filter","add_node","max_width","Math","min","max_height","min_width","min_height","_id","floor","push","remove_node","without","can_move_node","cloned_node","clone","extend","res","get_grid_height","can_be_placed_with_respect_to_height","no_pack","reduce","memo","begin_update","end_update","GridStack","el","opts","one_column_mode","self","container","item_class","is_nested","closest","size","attr","placeholder_class","handle","cell_height","vertical_margin","auto","float","static_grid","_class","random","toFixed","animate","always_show_resize_handle","resizable","autoHide","handles","draggable","scroll","appendTo","addClass","_set_static_class","_init_styles","grid","_update_styles","elements","_this","children","_prepare_element","set_animation","placeholder","hide","on_resize_handler","_is_one_column_mode","append","resize","_trigger_change_event","forceTrigger","hasChanges","eventParams","length","trigger","_styles_id","_styles","_max","prefix","_update_container_height","innerWidth","documentElement","clientWidth","body","data","cell_width","on_start_moving","event","ui","o","ceil","outerWidth","show","on_end_moving","detach","removeAttr","start","stop","drag","round","position","left","top","containment","parent","enable","removeClass","add_widget","will_it_fit","remove_widget","detach_node","removeData","remove_all","destroy","off","disable","val","movable","isNaN","_update_element","callback","first","move","update","get_cell_from_pixel","containerPos","relativeLeft","relativeTop","column_width","row_height","set_static","static_value","static_class_name","GridStackUI","fn","gridstack"],"mappings":"CAKA,SAAUA,GACgB,kBAAXC,SAAyBA,OAAOC,IACvCD,QAAQ,SAAU,SAAU,iBAAkB,mBAAoB,kBAAmB,sBACjF,uBAAwBD,GAG5BA,EAAQG,OAAQC,IAErB,SAASC,EAAGD,GAEX,GAAIE,GAAQC,OAERC,GACAC,eAAgB,SAASC,EAAGC,GACxB,QAASD,EAAEE,EAAIF,EAAEG,OAASF,EAAEC,GAAKD,EAAEC,EAAID,EAAEE,OAASH,EAAEE,GAAKF,EAAEI,EAAIJ,EAAEK,QAAUJ,EAAEG,GAAKH,EAAEG,EAAIH,EAAEI,QAAUL,EAAEI,IAG1GE,KAAM,SAASC,EAAOC,EAAKL,GAGvB,MAFAA,GAAQA,GAAST,EAAEe,MAAMF,GAAOG,IAAI,SAASC,GAAQ,MAAOA,GAAKT,EAAIS,EAAKR,QAAUS,MAAMC,QAC1FL,EAAa,IAAPA,EAAY,EAAI,GACfd,EAAEoB,OAAOP,EAAO,SAASQ,GAAK,MAAOP,IAAOO,EAAEb,EAAIa,EAAEX,EAAID,MAGnEa,kBAAmB,SAASC,GACxB,GAAIC,GAAQC,SAASC,cAAc,QAUnC,OATAF,GAAMG,aAAa,OAAQ,YAC3BH,EAAMG,aAAa,aAAcJ,GAC7BC,EAAMI,WACNJ,EAAMI,WAAWC,QAAU,GAG3BL,EAAMM,YAAYL,SAASM,eAAe,KAE9CN,SAASO,qBAAqB,QAAQ,GAAGF,YAAYN,GAC9CA,EAAMS,OAEjBC,kBAAmB,SAASX,GACxBtB,EAAE,oBAAsBsB,EAAI,KAAKY,UAErCC,gBAAiB,SA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S+E,GAExB9K,KAAKuE,UAAU6E,YAAY0B,IAInC/N,EAAMgO,YAAc7G,EAEpBnH,EAAMgO,YAAY9N,MAAQA,EAE1BH,EAAEkO,GAAGC,UAAY,SAAS7G,GACtB,MAAOpE,MAAKiB,KAAK,WACRnE,EAAEkD,MAAM8H,KAAK,cACdhL,EAAEkD,MAAM8H,KAAK,YAAa,GAAI5D,GAAUlE,KAAMoE,OAKnDrH,EAAMgO"} \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..dab447b --- /dev/null +++ b/package.json @@ -0,0 +1,22 @@ +{ + "name": "gridstack", + "version": "0.2.3", + "description": "gridstack.js is a jQuery plugin for widget layout", + "repository": { + "type": "git", + "url": "git+https://github.com/troolee/gridstack.js.git" + }, + "keywords": [ + "gridstack", + "grid", + "gridster", + "layout", + "jquery" + ], + "author": "Pavel Reznikov ", + "license": "MIT", + "bugs": { + "url": "https://github.com/troolee/gridstack.js/issues" + }, + "homepage": "http://troolee.github.io/gridstack.js/" +} diff --git a/src/gridstack-extra.css b/src/gridstack-extra.css new file mode 100644 index 0000000..2ea5adb --- /dev/null +++ b/src/gridstack-extra.css @@ -0,0 +1,983 @@ +.grid-stack.grid-stack-1 > .grid-stack-item { + min-width: 100%; +} +.grid-stack.grid-stack-1 > .grid-stack-item[data-gs-width='1'] { + width: 100%; +} +.grid-stack.grid-stack-1 > .grid-stack-item[data-gs-x='1'] { + left: 100%; +} +.grid-stack.grid-stack-1 > .grid-stack-item[data-gs-min-width='1'] { + min-width: 100%; +} +.grid-stack.grid-stack-1 > .grid-stack-item[data-gs-max-width='1'] { + max-width: 100%; +} + +.grid-stack.grid-stack-2 > .grid-stack-item { + min-width: 50%; +} +.grid-stack.grid-stack-2 > .grid-stack-item[data-gs-width='1'] { + width: 50%; +} +.grid-stack.grid-stack-2 > .grid-stack-item[data-gs-x='1'] { + left: 50%; +} +.grid-stack.grid-stack-2 > .grid-stack-item[data-gs-min-width='1'] { + min-width: 50%; +} +.grid-stack.grid-stack-2 > .grid-stack-item[data-gs-max-width='1'] { + max-width: 50%; +} +.grid-stack.grid-stack-2 > .grid-stack-item[data-gs-width='2'] { + width: 100%; +} +.grid-stack.grid-stack-2 > .grid-stack-item[data-gs-x='2'] { + left: 100%; +} +.grid-stack.grid-stack-2 > .grid-stack-item[data-gs-min-width='2'] { + min-width: 100%; +} +.grid-stack.grid-stack-2 > .grid-stack-item[data-gs-max-width='2'] { + max-width: 100%; +} + +.grid-stack.grid-stack-3 > .grid-stack-item { + min-width: 33.33333333%; +} +.grid-stack.grid-stack-3 > .grid-stack-item[data-gs-width='1'] { + width: 33.33333333%; +} +.grid-stack.grid-stack-3 > .grid-stack-item[data-gs-x='1'] { + left: 33.33333333%; +} +.grid-stack.grid-stack-3 > .grid-stack-item[data-gs-min-width='1'] { + min-width: 33.33333333%; +} +.grid-stack.grid-stack-3 > .grid-stack-item[data-gs-max-width='1'] { + max-width: 33.33333333%; +} +.grid-stack.grid-stack-3 > .grid-stack-item[data-gs-width='2'] { + width: 66.66666667%; +} +.grid-stack.grid-stack-3 > .grid-stack-item[data-gs-x='2'] { + left: 66.66666667%; +} +.grid-stack.grid-stack-3 > .grid-stack-item[data-gs-min-width='2'] { + min-width: 66.66666667%; +} +.grid-stack.grid-stack-3 > .grid-stack-item[data-gs-max-width='2'] { + max-width: 66.66666667%; +} +.grid-stack.grid-stack-3 > .grid-stack-item[data-gs-width='3'] { + width: 100%; +} +.grid-stack.grid-stack-3 > .grid-stack-item[data-gs-x='3'] { + left: 100%; +} +.grid-stack.grid-stack-3 > .grid-stack-item[data-gs-min-width='3'] { + min-width: 100%; +} +.grid-stack.grid-stack-3 > .grid-stack-item[data-gs-max-width='3'] { + max-width: 100%; +} + +.grid-stack.grid-stack-4 > .grid-stack-item { + min-width: 25%; +} +.grid-stack.grid-stack-4 > .grid-stack-item[data-gs-width='1'] { + width: 25%; +} +.grid-stack.grid-stack-4 > .grid-stack-item[data-gs-x='1'] { + left: 25%; +} +.grid-stack.grid-stack-4 > .grid-stack-item[data-gs-min-width='1'] { + min-width: 25%; +} +.grid-stack.grid-stack-4 > .grid-stack-item[data-gs-max-width='1'] { + max-width: 25%; +} +.grid-stack.grid-stack-4 > .grid-stack-item[data-gs-width='2'] { + width: 50%; +} +.grid-stack.grid-stack-4 > .grid-stack-item[data-gs-x='2'] { + left: 50%; +} +.grid-stack.grid-stack-4 > .grid-stack-item[data-gs-min-width='2'] { + min-width: 50%; +} +.grid-stack.grid-stack-4 > .grid-stack-item[data-gs-max-width='2'] { + max-width: 50%; +} +.grid-stack.grid-stack-4 > .grid-stack-item[data-gs-width='3'] { + width: 75%; +} +.grid-stack.grid-stack-4 > .grid-stack-item[data-gs-x='3'] { + left: 75%; +} +.grid-stack.grid-stack-4 > .grid-stack-item[data-gs-min-width='3'] { + min-width: 75%; +} +.grid-stack.grid-stack-4 > .grid-stack-item[data-gs-max-width='3'] { + max-width: 75%; +} +.grid-stack.grid-stack-4 > .grid-stack-item[data-gs-width='4'] { + width: 100%; +} +.grid-stack.grid-stack-4 > .grid-stack-item[data-gs-x='4'] { + left: 100%; +} +.grid-stack.grid-stack-4 > .grid-stack-item[data-gs-min-width='4'] { + min-width: 100%; +} +.grid-stack.grid-stack-4 > .grid-stack-item[data-gs-max-width='4'] { + max-width: 100%; +} + +.grid-stack.grid-stack-5 > .grid-stack-item { + min-width: 20%; +} +.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-width='1'] { + width: 20%; +} +.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-x='1'] { + left: 20%; +} +.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-min-width='1'] { + min-width: 20%; +} +.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-max-width='1'] { + max-width: 20%; +} +.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-width='2'] { + width: 40%; +} +.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-x='2'] { + left: 40%; +} +.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-min-width='2'] { + min-width: 40%; +} +.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-max-width='2'] { + max-width: 40%; +} +.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-width='3'] { + width: 60%; +} +.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-x='3'] { + left: 60%; +} +.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-min-width='3'] { + min-width: 60%; +} +.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-max-width='3'] { + max-width: 60%; +} +.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-width='4'] { + width: 80%; +} +.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-x='4'] { + left: 80%; +} +.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-min-width='4'] { + min-width: 80%; +} +.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-max-width='4'] { + max-width: 80%; +} +.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-width='5'] { + width: 100%; +} +.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-x='5'] { + left: 100%; +} +.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-min-width='5'] { + min-width: 100%; +} +.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-max-width='5'] { + max-width: 100%; +} + +.grid-stack.grid-stack-6 > .grid-stack-item { + min-width: 16.66666667%; +} +.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-width='1'] { + width: 16.66666667%; +} +.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-x='1'] { + left: 16.66666667%; +} +.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-min-width='1'] { + min-width: 16.66666667%; +} +.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-max-width='1'] { + max-width: 16.66666667%; +} +.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-width='2'] { + width: 33.33333333%; +} +.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-x='2'] { + left: 33.33333333%; +} +.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-min-width='2'] { + min-width: 33.33333333%; +} +.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-max-width='2'] { + max-width: 33.33333333%; +} +.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-width='3'] { + width: 50%; +} +.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-x='3'] { + left: 50%; +} +.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-min-width='3'] { + min-width: 50%; +} +.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-max-width='3'] { + max-width: 50%; +} +.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-width='4'] { + width: 66.66666667%; +} +.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-x='4'] { + left: 66.66666667%; +} +.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-min-width='4'] { + min-width: 66.66666667%; +} +.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-max-width='4'] { + max-width: 66.66666667%; +} +.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-width='5'] { + width: 83.33333333%; +} +.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-x='5'] { + left: 83.33333333%; +} +.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-min-width='5'] { + min-width: 83.33333333%; +} +.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-max-width='5'] { + max-width: 83.33333333%; +} +.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-width='6'] { + width: 100%; +} +.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-x='6'] { + left: 100%; +} +.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-min-width='6'] { + min-width: 100%; +} +.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-max-width='6'] { + max-width: 100%; +} + +.grid-stack.grid-stack-7 > .grid-stack-item { + min-width: 14.28571429%; +} +.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-width='1'] { + width: 14.28571429%; +} +.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-x='1'] { + left: 14.28571429%; +} +.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-min-width='1'] { + min-width: 14.28571429%; +} +.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-max-width='1'] { + max-width: 14.28571429%; +} +.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-width='2'] { + width: 28.57142857%; +} +.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-x='2'] { + left: 28.57142857%; +} +.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-min-width='2'] { + min-width: 28.57142857%; +} +.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-max-width='2'] { + max-width: 28.57142857%; +} +.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-width='3'] { + width: 42.85714286%; +} +.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-x='3'] { + left: 42.85714286%; +} +.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-min-width='3'] { + min-width: 42.85714286%; +} +.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-max-width='3'] { + max-width: 42.85714286%; +} +.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-width='4'] { + width: 57.14285714%; +} +.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-x='4'] { + left: 57.14285714%; +} +.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-min-width='4'] { + min-width: 57.14285714%; +} +.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-max-width='4'] { + max-width: 57.14285714%; +} +.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-width='5'] { + width: 71.42857143%; +} +.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-x='5'] { + left: 71.42857143%; +} +.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-min-width='5'] { + min-width: 71.42857143%; +} +.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-max-width='5'] { + max-width: 71.42857143%; +} +.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-width='6'] { + width: 85.71428571%; +} +.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-x='6'] { + left: 85.71428571%; +} +.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-min-width='6'] { + min-width: 85.71428571%; +} +.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-max-width='6'] { + max-width: 85.71428571%; +} +.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-width='7'] { + width: 100%; +} +.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-x='7'] { + left: 100%; +} +.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-min-width='7'] { + min-width: 100%; +} +.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-max-width='7'] { + max-width: 100%; +} + +.grid-stack.grid-stack-8 > .grid-stack-item { + min-width: 12.5%; +} +.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-width='1'] { + width: 12.5%; +} +.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-x='1'] { + left: 12.5%; +} +.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-min-width='1'] { + min-width: 12.5%; +} +.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-max-width='1'] { + max-width: 12.5%; +} +.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-width='2'] { + width: 25%; +} +.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-x='2'] { + left: 25%; +} +.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-min-width='2'] { + min-width: 25%; +} +.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-max-width='2'] { + max-width: 25%; +} +.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-width='3'] { + width: 37.5%; +} +.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-x='3'] { + left: 37.5%; +} +.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-min-width='3'] { + min-width: 37.5%; +} +.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-max-width='3'] { + max-width: 37.5%; +} +.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-width='4'] { + width: 50%; +} +.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-x='4'] { + left: 50%; +} +.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-min-width='4'] { + min-width: 50%; +} +.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-max-width='4'] { + max-width: 50%; +} +.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-width='5'] { + width: 62.5%; +} +.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-x='5'] { + left: 62.5%; +} +.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-min-width='5'] { + min-width: 62.5%; +} +.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-max-width='5'] { + max-width: 62.5%; +} +.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-width='6'] { + width: 75%; +} +.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-x='6'] { + left: 75%; +} +.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-min-width='6'] { + min-width: 75%; +} +.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-max-width='6'] { + max-width: 75%; +} +.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-width='7'] { + width: 87.5%; +} +.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-x='7'] { + left: 87.5%; +} +.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-min-width='7'] { + min-width: 87.5%; +} +.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-max-width='7'] { + max-width: 87.5%; +} +.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-width='8'] { + width: 100%; +} +.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-x='8'] { + left: 100%; +} +.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-min-width='8'] { + min-width: 100%; +} +.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-max-width='8'] { + max-width: 100%; +} + +.grid-stack.grid-stack-9 > .grid-stack-item { + min-width: 11.11111111%; +} +.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-width='1'] { + width: 11.11111111%; +} +.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-x='1'] { + left: 11.11111111%; +} +.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-min-width='1'] { + min-width: 11.11111111%; +} +.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-max-width='1'] { + max-width: 11.11111111%; +} +.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-width='2'] { + width: 22.22222222%; +} +.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-x='2'] { + left: 22.22222222%; +} +.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-min-width='2'] { + min-width: 22.22222222%; +} +.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-max-width='2'] { + max-width: 22.22222222%; +} +.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-width='3'] { + width: 33.33333333%; +} +.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-x='3'] { + left: 33.33333333%; +} +.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-min-width='3'] { + min-width: 33.33333333%; +} +.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-max-width='3'] { + max-width: 33.33333333%; +} +.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-width='4'] { + width: 44.44444444%; +} +.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-x='4'] { + left: 44.44444444%; +} +.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-min-width='4'] { + min-width: 44.44444444%; +} +.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-max-width='4'] { + max-width: 44.44444444%; +} +.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-width='5'] { + width: 55.55555556%; +} +.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-x='5'] { + left: 55.55555556%; +} +.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-min-width='5'] { + min-width: 55.55555556%; +} +.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-max-width='5'] { + max-width: 55.55555556%; +} +.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-width='6'] { + width: 66.66666667%; +} +.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-x='6'] { + left: 66.66666667%; +} +.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-min-width='6'] { + min-width: 66.66666667%; +} +.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-max-width='6'] { + max-width: 66.66666667%; +} +.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-width='7'] { + width: 77.77777778%; +} +.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-x='7'] { + left: 77.77777778%; +} +.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-min-width='7'] { + min-width: 77.77777778%; +} +.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-max-width='7'] { + max-width: 77.77777778%; +} +.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-width='8'] { + width: 88.88888889%; +} +.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-x='8'] { + left: 88.88888889%; +} +.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-min-width='8'] { + min-width: 88.88888889%; +} +.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-max-width='8'] { + max-width: 88.88888889%; +} +.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-width='9'] { + width: 100%; +} +.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-x='9'] { + left: 100%; +} +.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-min-width='9'] { + min-width: 100%; +} +.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-max-width='9'] { + max-width: 100%; +} + +.grid-stack.grid-stack-10 > .grid-stack-item { + min-width: 10%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-width='1'] { + width: 10%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-x='1'] { + left: 10%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-min-width='1'] { + min-width: 10%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-max-width='1'] { + max-width: 10%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-width='2'] { + width: 20%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-x='2'] { + left: 20%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-min-width='2'] { + min-width: 20%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-max-width='2'] { + max-width: 20%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-width='3'] { + width: 30%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-x='3'] { + left: 30%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-min-width='3'] { + min-width: 30%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-max-width='3'] { + max-width: 30%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-width='4'] { + width: 40%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-x='4'] { + left: 40%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-min-width='4'] { + min-width: 40%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-max-width='4'] { + max-width: 40%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-width='5'] { + width: 50%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-x='5'] { + left: 50%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-min-width='5'] { + min-width: 50%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-max-width='5'] { + max-width: 50%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-width='6'] { + width: 60%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-x='6'] { + left: 60%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-min-width='6'] { + min-width: 60%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-max-width='6'] { + max-width: 60%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-width='7'] { + width: 70%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-x='7'] { + left: 70%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-min-width='7'] { + min-width: 70%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-max-width='7'] { + max-width: 70%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-width='8'] { + width: 80%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-x='8'] { + left: 80%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-min-width='8'] { + min-width: 80%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-max-width='8'] { + max-width: 80%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-width='9'] { + width: 90%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-x='9'] { + left: 90%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-min-width='9'] { + min-width: 90%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-max-width='9'] { + max-width: 90%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-width='10'] { + width: 100%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-x='10'] { + left: 100%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-min-width='10'] { + min-width: 100%; +} +.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-max-width='10'] { + max-width: 100%; +} + +.grid-stack.grid-stack-11 > .grid-stack-item { + min-width: 9.09090909%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-width='1'] { + width: 9.09090909%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-x='1'] { + left: 9.09090909%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-min-width='1'] { + min-width: 9.09090909%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-max-width='1'] { + max-width: 9.09090909%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-width='2'] { + width: 18.18181818%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-x='2'] { + left: 18.18181818%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-min-width='2'] { + min-width: 18.18181818%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-max-width='2'] { + max-width: 18.18181818%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-width='3'] { + width: 27.27272727%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-x='3'] { + left: 27.27272727%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-min-width='3'] { + min-width: 27.27272727%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-max-width='3'] { + max-width: 27.27272727%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-width='4'] { + width: 36.36363636%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-x='4'] { + left: 36.36363636%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-min-width='4'] { + min-width: 36.36363636%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-max-width='4'] { + max-width: 36.36363636%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-width='5'] { + width: 45.45454545%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-x='5'] { + left: 45.45454545%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-min-width='5'] { + min-width: 45.45454545%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-max-width='5'] { + max-width: 45.45454545%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-width='6'] { + width: 54.54545455%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-x='6'] { + left: 54.54545455%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-min-width='6'] { + min-width: 54.54545455%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-max-width='6'] { + max-width: 54.54545455%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-width='7'] { + width: 63.63636364%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-x='7'] { + left: 63.63636364%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-min-width='7'] { + min-width: 63.63636364%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-max-width='7'] { + max-width: 63.63636364%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-width='8'] { + width: 72.72727273%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-x='8'] { + left: 72.72727273%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-min-width='8'] { + min-width: 72.72727273%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-max-width='8'] { + max-width: 72.72727273%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-width='9'] { + width: 81.81818182%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-x='9'] { + left: 81.81818182%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-min-width='9'] { + min-width: 81.81818182%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-max-width='9'] { + max-width: 81.81818182%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-width='10'] { + width: 90.90909091%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-x='10'] { + left: 90.90909091%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-min-width='10'] { + min-width: 90.90909091%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-max-width='10'] { + max-width: 90.90909091%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-width='11'] { + width: 100.0%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-x='11'] { + left: 100.0%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-min-width='11'] { + min-width: 100.0%; +} +.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-max-width='11'] { + max-width: 100.0%; +} + +.grid-stack.grid-stack-12 > .grid-stack-item { + min-width: 8.33333333%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-width='1'] { + width: 8.33333333%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-x='1'] { + left: 8.33333333%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-min-width='1'] { + min-width: 8.33333333%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-max-width='1'] { + max-width: 8.33333333%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-width='2'] { + width: 16.66666667%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-x='2'] { + left: 16.66666667%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-min-width='2'] { + min-width: 16.66666667%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-max-width='2'] { + max-width: 16.66666667%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-width='3'] { + width: 25%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-x='3'] { + left: 25%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-min-width='3'] { + min-width: 25%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-max-width='3'] { + max-width: 25%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-width='4'] { + width: 33.33333333%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-x='4'] { + left: 33.33333333%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-min-width='4'] { + min-width: 33.33333333%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-max-width='4'] { + max-width: 33.33333333%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-width='5'] { + width: 41.66666667%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-x='5'] { + left: 41.66666667%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-min-width='5'] { + min-width: 41.66666667%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-max-width='5'] { + max-width: 41.66666667%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-width='6'] { + width: 50%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-x='6'] { + left: 50%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-min-width='6'] { + min-width: 50%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-max-width='6'] { + max-width: 50%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-width='7'] { + width: 58.33333333%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-x='7'] { + left: 58.33333333%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-min-width='7'] { + min-width: 58.33333333%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-max-width='7'] { + max-width: 58.33333333%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-width='8'] { + width: 66.66666667%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-x='8'] { + left: 66.66666667%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-min-width='8'] { + min-width: 66.66666667%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-max-width='8'] { + max-width: 66.66666667%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-width='9'] { + width: 75%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-x='9'] { + left: 75%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-min-width='9'] { + min-width: 75%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-max-width='9'] { + max-width: 75%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-width='10'] { + width: 83.33333333%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-x='10'] { + left: 83.33333333%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-min-width='10'] { + min-width: 83.33333333%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-max-width='10'] { + max-width: 83.33333333%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-width='11'] { + width: 91.66666667%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-x='11'] { + left: 91.66666667%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-min-width='11'] { + min-width: 91.66666667%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-max-width='11'] { + max-width: 91.66666667%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-width='12'] { + width: 100%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-x='12'] { + left: 100%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-min-width='12'] { + min-width: 100%; +} +.grid-stack.grid-stack-12 > .grid-stack-item[data-gs-max-width='12'] { + max-width: 100%; +} diff --git a/src/gridstack-extra.scss b/src/gridstack-extra.scss new file mode 100644 index 0000000..fbf6cc1 --- /dev/null +++ b/src/gridstack-extra.scss @@ -0,0 +1,21 @@ +$gridstack-columns: 12; + +@mixin grid-stack-items($gridstack-columns) { + .grid-stack.grid-stack-#{$gridstack-columns} { + + > .grid-stack-item { + min-width: 100% / $gridstack-columns; + + @for $i from 1 through $gridstack-columns { + &[data-gs-width='#{$i}'] { width: (100% / $gridstack-columns) * $i; } + &[data-gs-x='#{$i}'] { left: (100% / $gridstack-columns) * $i; } + &[data-gs-min-width='#{$i}'] { min-width: (100% / $gridstack-columns) * $i; } + &[data-gs-max-width='#{$i}'] { max-width: (100% / $gridstack-columns) * $i; } + } + } + } +} + +@for $j from 1 through $gridstack-columns { + @include grid-stack-items($j) +} diff --git a/src/gridstack.css b/src/gridstack.css new file mode 100644 index 0000000..50d468e --- /dev/null +++ b/src/gridstack.css @@ -0,0 +1,318 @@ +:root .grid-stack-item > .ui-resizable-handle { + filter: none; +} + +.grid-stack { + position: relative; +} +.grid-stack .grid-stack-placeholder > .placeholder-content { + border: 1px dashed lightgray; + margin: 0; + position: absolute; + top: 0; + left: 10px; + right: 10px; + bottom: 0; + width: auto; + z-index: 0 !important; +} +.grid-stack > .grid-stack-item { + min-width: 8.33333333%; + position: absolute; + padding: 0; +} +.grid-stack > .grid-stack-item > .grid-stack-item-content { + margin: 0; + position: absolute; + top: 0; + left: 10px; + right: 10px; + bottom: 0; + width: auto; + z-index: 0 !important; + overflow-x: hidden; + overflow-y: auto; +} +.grid-stack > .grid-stack-item > .ui-resizable-handle { + position: absolute; + font-size: 0.1px; + display: block; + -ms-touch-action: none; + touch-action: none; +} +.grid-stack > .grid-stack-item.ui-resizable-disabled > .ui-resizable-handle, .grid-stack > .grid-stack-item.ui-resizable-autohide > .ui-resizable-handle { + display: none; +} +.grid-stack > .grid-stack-item.ui-draggable-dragging, .grid-stack > .grid-stack-item.ui-resizable-resizing { + z-index: 100; +} +.grid-stack > .grid-stack-item.ui-draggable-dragging > .grid-stack-item-content, +.grid-stack > .grid-stack-item.ui-draggable-dragging > .grid-stack-item-content, .grid-stack > .grid-stack-item.ui-resizable-resizing > .grid-stack-item-content, +.grid-stack > .grid-stack-item.ui-resizable-resizing > .grid-stack-item-content { + box-shadow: 1px 4px 6px rgba(0, 0, 0, 0.2); + opacity: 0.8; +} +.grid-stack > .grid-stack-item > .ui-resizable-se, +.grid-stack > .grid-stack-item > .ui-resizable-sw { + text-align: right; + color: gray; + padding: 2px 3px 0 0; + margin: 0; + font: normal normal normal 10px/1 FontAwesome; + font-size: inherit; + text-rendering: auto; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} +.grid-stack > .grid-stack-item > .ui-resizable-se::before, +.grid-stack > .grid-stack-item > .ui-resizable-sw::before { + content: "\f065"; +} +.grid-stack > .grid-stack-item > .ui-resizable-se { + display: inline-block; + filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1); + -webkit-transform: rotate(90deg); + -moz-transform: rotate(90deg); + -ms-transform: rotate(90deg); + -o-transform: rotate(90deg); + transform: rotate(90deg); +} +.grid-stack > .grid-stack-item > .ui-resizable-nw { + cursor: nw-resize; + width: 20px; + height: 20px; + left: 10px; + top: 0; +} +.grid-stack > .grid-stack-item > .ui-resizable-n { + cursor: n-resize; + height: 10px; + top: 0; + left: 25px; + right: 25px; +} +.grid-stack > .grid-stack-item > .ui-resizable-ne { + cursor: ne-resize; + width: 20px; + height: 20px; + right: 10px; + top: 0; +} +.grid-stack > .grid-stack-item > .ui-resizable-e { + cursor: e-resize; + width: 10px; + right: 10px; + top: 15px; + bottom: 15px; +} +.grid-stack > .grid-stack-item > .ui-resizable-se { + cursor: se-resize; + width: 20px; + height: 20px; + right: 10px; + bottom: 0; +} +.grid-stack > .grid-stack-item > .ui-resizable-s { + cursor: s-resize; + height: 10px; + left: 25px; + bottom: 0; + right: 25px; +} +.grid-stack > .grid-stack-item > .ui-resizable-sw { + cursor: sw-resize; + width: 20px; + height: 20px; + left: 10px; + bottom: 0; +} +.grid-stack > .grid-stack-item > .ui-resizable-w { + cursor: w-resize; + width: 10px; + left: 10px; + top: 15px; + bottom: 15px; +} +.grid-stack > .grid-stack-item[data-gs-width='1'] { + width: 8.33333333%; +} +.grid-stack > .grid-stack-item[data-gs-x='1'] { + left: 8.33333333%; +} +.grid-stack > .grid-stack-item[data-gs-min-width='1'] { + min-width: 8.33333333%; +} +.grid-stack > .grid-stack-item[data-gs-max-width='1'] { + max-width: 8.33333333%; +} +.grid-stack > .grid-stack-item[data-gs-width='2'] { + width: 16.66666667%; +} +.grid-stack > .grid-stack-item[data-gs-x='2'] { + left: 16.66666667%; +} +.grid-stack > .grid-stack-item[data-gs-min-width='2'] { + min-width: 16.66666667%; +} +.grid-stack > .grid-stack-item[data-gs-max-width='2'] { + max-width: 16.66666667%; +} +.grid-stack > .grid-stack-item[data-gs-width='3'] { + width: 25%; +} +.grid-stack > .grid-stack-item[data-gs-x='3'] { + left: 25%; +} +.grid-stack > .grid-stack-item[data-gs-min-width='3'] { + min-width: 25%; +} +.grid-stack > .grid-stack-item[data-gs-max-width='3'] { + max-width: 25%; +} +.grid-stack > .grid-stack-item[data-gs-width='4'] { + width: 33.33333333%; +} +.grid-stack > .grid-stack-item[data-gs-x='4'] { + left: 33.33333333%; +} +.grid-stack > .grid-stack-item[data-gs-min-width='4'] { + min-width: 33.33333333%; +} +.grid-stack > .grid-stack-item[data-gs-max-width='4'] { + max-width: 33.33333333%; +} +.grid-stack > .grid-stack-item[data-gs-width='5'] { + width: 41.66666667%; +} +.grid-stack > .grid-stack-item[data-gs-x='5'] { + left: 41.66666667%; +} +.grid-stack > .grid-stack-item[data-gs-min-width='5'] { + min-width: 41.66666667%; +} +.grid-stack > .grid-stack-item[data-gs-max-width='5'] { + max-width: 41.66666667%; +} +.grid-stack > .grid-stack-item[data-gs-width='6'] { + width: 50%; +} +.grid-stack > .grid-stack-item[data-gs-x='6'] { + left: 50%; +} +.grid-stack > .grid-stack-item[data-gs-min-width='6'] { + min-width: 50%; +} +.grid-stack > .grid-stack-item[data-gs-max-width='6'] { + max-width: 50%; +} +.grid-stack > .grid-stack-item[data-gs-width='7'] { + width: 58.33333333%; +} +.grid-stack > .grid-stack-item[data-gs-x='7'] { + left: 58.33333333%; +} +.grid-stack > .grid-stack-item[data-gs-min-width='7'] { + min-width: 58.33333333%; +} +.grid-stack > .grid-stack-item[data-gs-max-width='7'] { + max-width: 58.33333333%; +} +.grid-stack > .grid-stack-item[data-gs-width='8'] { + width: 66.66666667%; +} +.grid-stack > .grid-stack-item[data-gs-x='8'] { + left: 66.66666667%; +} +.grid-stack > .grid-stack-item[data-gs-min-width='8'] { + min-width: 66.66666667%; +} +.grid-stack > .grid-stack-item[data-gs-max-width='8'] { + max-width: 66.66666667%; +} +.grid-stack > .grid-stack-item[data-gs-width='9'] { + width: 75%; +} +.grid-stack > .grid-stack-item[data-gs-x='9'] { + left: 75%; +} +.grid-stack > .grid-stack-item[data-gs-min-width='9'] { + min-width: 75%; +} +.grid-stack > .grid-stack-item[data-gs-max-width='9'] { + max-width: 75%; +} +.grid-stack > .grid-stack-item[data-gs-width='10'] { + width: 83.33333333%; +} +.grid-stack > .grid-stack-item[data-gs-x='10'] { + left: 83.33333333%; +} +.grid-stack > .grid-stack-item[data-gs-min-width='10'] { + min-width: 83.33333333%; +} +.grid-stack > .grid-stack-item[data-gs-max-width='10'] { + max-width: 83.33333333%; +} +.grid-stack > .grid-stack-item[data-gs-width='11'] { + width: 91.66666667%; +} +.grid-stack > .grid-stack-item[data-gs-x='11'] { + left: 91.66666667%; +} +.grid-stack > .grid-stack-item[data-gs-min-width='11'] { + min-width: 91.66666667%; +} +.grid-stack > .grid-stack-item[data-gs-max-width='11'] { + max-width: 91.66666667%; +} +.grid-stack > .grid-stack-item[data-gs-width='12'] { + width: 100%; +} +.grid-stack > .grid-stack-item[data-gs-x='12'] { + left: 100%; +} +.grid-stack > .grid-stack-item[data-gs-min-width='12'] { + min-width: 100%; +} +.grid-stack > .grid-stack-item[data-gs-max-width='12'] { + max-width: 100%; +} +.grid-stack.grid-stack-animate, .grid-stack.grid-stack-animate .grid-stack-item { + -webkit-transition: left 0.3s, top 0.3s, height 0.3s, width 0.3s; + -moz-transition: left 0.3s, top 0.3s, height 0.3s, width 0.3s; + -ms-transition: left 0.3s, top 0.3s, height 0.3s, width 0.3s; + -o-transition: left 0.3s, top 0.3s, height 0.3s, width 0.3s; + transition: left 0.3s, top 0.3s, height 0.3s, width 0.3s; +} +.grid-stack.grid-stack-animate .grid-stack-item.ui-draggable-dragging, .grid-stack.grid-stack-animate .grid-stack-item.ui-resizable-resizing, .grid-stack.grid-stack-animate .grid-stack-item.grid-stack-placeholder { + -webkit-transition: left 0s, top 0s, height 0s, width 0s; + -moz-transition: left 0s, top 0s, height 0s, width 0s; + -ms-transition: left 0s, top 0s, height 0s, width 0s; + -o-transition: left 0s, top 0s, height 0s, width 0s; + transition: left 0s, top 0s, height 0s, width 0s; +} + +/** Uncomment this to show bottom-left resize handle **/ +/* +.grid-stack > .grid-stack-item > .ui-resizable-sw { + display: inline-block; + filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3); + @include vendor(transform, rotate(180deg)); +} +*/ +@media (max-width: 768px) { + .grid-stack-item { + position: relative !important; + width: auto !important; + left: 0 !important; + top: auto !important; + margin-bottom: 20px; + } + .grid-stack-item .ui-resizable-handle { + display: none; + } + + .grid-stack { + height: auto !important; + } +} diff --git a/src/gridstack.js b/src/gridstack.js index 88b47de..181fcd5 100644 --- a/src/gridstack.js +++ b/src/gridstack.js @@ -1,54 +1,57 @@ -// gridstack.js 0.2.3-dev +// gridstack.js 0.2.4-dev // http://troolee.github.io/gridstack.js/ // (c) 2014-2015 Pavel Reznikov // gridstack.js may be freely distributed under the MIT license. -(function (factory) { +(function(factory) { if (typeof define === 'function' && define.amd) { - define(['jquery', 'lodash', 'jquery-ui/core', 'jquery-ui/widget', 'jquery-ui/mouse', 'jquery-ui/draggable', 'jquery-ui/resizable'], factory); + define(['jquery', 'lodash', 'jquery-ui/core', 'jquery-ui/widget', 'jquery-ui/mouse', 'jquery-ui/draggable', + 'jquery-ui/resizable'], factory); } else { factory(jQuery, _); } -})(function ($, _) { +})(function($, _) { var scope = window; var Utils = { - is_intercepted: function (a, b) { + is_intercepted: function(a, b) { return !(a.x + a.width <= b.x || b.x + b.width <= a.x || a.y + a.height <= b.y || b.y + b.height <= a.y); }, - sort: function (nodes, dir, width) { - width = width || _.chain(nodes).map(function (node) { return node.x + node.width; }).max().value(); + sort: function(nodes, dir, width) { + width = width || _.chain(nodes).map(function(node) { return node.x + node.width; }).max().value(); dir = dir != -1 ? 1 : -1; - return _.sortBy(nodes, function (n) { return dir * (n.x + n.y * width); }); + return _.sortBy(nodes, function(n) { return dir * (n.x + n.y * width); }); }, - create_stylesheet: function (id) { - var style = document.createElement("style"); - style.setAttribute("type", "text/css"); - style.setAttribute("data-gs-id", id); + create_stylesheet: function(id) { + var style = document.createElement('style'); + style.setAttribute('type', 'text/css'); + style.setAttribute('data-gs-id', id); if (style.styleSheet) { - style.styleSheet.cssText = ""; + style.styleSheet.cssText = ''; } else { - style.appendChild(document.createTextNode("")); + style.appendChild(document.createTextNode('')); } document.getElementsByTagName('head')[0].appendChild(style); return style.sheet; }, - - insert_css_rule: function (sheet, selector, rules, index) { - if(typeof sheet.insertRule === 'function') { - sheet.insertRule(selector + "{" + rules + "}", index); + remove_stylesheet: function(id) { + $("STYLE[data-gs-id=" + id +"]").remove(); + }, + insert_css_rule: function(sheet, selector, rules, index) { + if (typeof sheet.insertRule === 'function') { + sheet.insertRule(selector + '{' + rules + '}', index); } - else if(typeof sheet.addRule === 'function') { + else if (typeof sheet.addRule === 'function') { sheet.addRule(selector, rules, index); } }, - toBool: function (v) { + toBool: function(v) { if (typeof v == 'boolean') return v; if (typeof v == 'string') { @@ -61,24 +64,24 @@ var id_seq = 0; - var GridStackEngine = function (width, onchange, float, height, items) { + var GridStackEngine = function(width, onchange, float_mode, height, items) { this.width = width; - this.float = float || false; + this['float'] = float_mode || false; this.height = height || 0; this.nodes = items || []; - this.onchange = onchange || function () {}; + this.onchange = onchange || function() {}; this._update_counter = 0; - this._float = this.float; + this._float = this['float']; }; - GridStackEngine.prototype.batch_update = function () { + GridStackEngine.prototype.batch_update = function() { this._update_counter = 1; this.float = true; }; - GridStackEngine.prototype.commit = function () { + GridStackEngine.prototype.commit = function() { this._update_counter = 0; if (this._update_counter == 0) { this.float = this._float; @@ -87,16 +90,16 @@ } }; - GridStackEngine.prototype._fix_collisions = function (node) { + GridStackEngine.prototype._fix_collisions = function(node) { this._sort_nodes(-1); - var nn = node, has_locked = Boolean(_.find(this.nodes, function (n) { return n.locked })); + var nn = node, has_locked = Boolean(_.find(this.nodes, function(n) { return n.locked })); if (!this.float && !has_locked) { nn = {x: 0, y: node.y, width: this.width, height: node.height}; } while (true) { - var collision_node = _.find(this.nodes, function (n) { + var collision_node = _.find(this.nodes, function(n) { return n != node && Utils.is_intercepted(n, nn); }, this); if (typeof collision_node == 'undefined') { @@ -107,31 +110,32 @@ } }; - GridStackEngine.prototype.is_area_empty = function (x, y, width, height) { + GridStackEngine.prototype.is_area_empty = function(x, y, width, height) { var nn = {x: x || 0, y: y || 0, width: width || 1, height: height || 1}; - var collision_node = _.find(this.nodes, function (n) { + var collision_node = _.find(this.nodes, function(n) { return Utils.is_intercepted(n, nn); }, this); return collision_node == null; }; - GridStackEngine.prototype._sort_nodes = function (dir) { + GridStackEngine.prototype._sort_nodes = function(dir) { this.nodes = Utils.sort(this.nodes, dir, this.width); }; - GridStackEngine.prototype._pack_nodes = function () { + GridStackEngine.prototype._pack_nodes = function() { this._sort_nodes(); if (this.float) { - _.each(this.nodes, function (n, i) { + _.each(this.nodes, function(n, i) { if (n._updating || typeof n._orig_y == 'undefined' || n.y == n._orig_y) return; var new_y = n.y; while (new_y >= n._orig_y) { var collision_node = _.chain(this.nodes) - .find(function (bn) { - return n != bn && Utils.is_intercepted({x: n.x, y: new_y, width: n.width, height: n.height}, bn); + .find(function(bn) { + return n != bn && + Utils.is_intercepted({x: n.x, y: new_y, width: n.width, height: n.height}, bn); }) .value(); @@ -144,7 +148,7 @@ }, this); } else { - _.each(this.nodes, function (n, i) { + _.each(this.nodes, function(n, i) { if (n.locked) return; while (n.y > 0) { @@ -154,7 +158,7 @@ if (i > 0) { var collision_node = _.chain(this.nodes) .take(i) - .find(function (bn) { + .find(function(bn) { return Utils.is_intercepted({x: n.x, y: new_y, width: n.width, height: n.height}, bn); }) .value(); @@ -171,7 +175,7 @@ } }; - GridStackEngine.prototype._prepare_node = function (node, resizing) { + GridStackEngine.prototype._prepare_node = function(node, resizing) { node = _.defaults(node || {}, {width: 1, height: 1, x: 0, y: 0 }); node.x = parseInt('' + node.x); @@ -213,7 +217,7 @@ return node; }; - GridStackEngine.prototype._notify = function () { + GridStackEngine.prototype._notify = function() { if (this._update_counter) { return; } @@ -222,12 +226,12 @@ this.onchange(deleted_nodes); }; - GridStackEngine.prototype.clean_nodes = function () { - _.each(this.nodes, function (n) {n._dirty = false }); + GridStackEngine.prototype.clean_nodes = function() { + _.each(this.nodes, function(n) {n._dirty = false }); }; - GridStackEngine.prototype.get_dirty_nodes = function () { - return _.filter(this.nodes, function (n) { return n._dirty; }); + GridStackEngine.prototype.get_dirty_nodes = function() { + return _.filter(this.nodes, function(n) { return n._dirty; }); }; GridStackEngine.prototype.add_node = function(node) { @@ -244,12 +248,12 @@ if (node.auto_position) { this._sort_nodes(); - for (var i = 0; ; ++i) { + for (var i = 0;; ++i) { var x = i % this.width, y = Math.floor(i / this.width); if (x + node.width > this.width) { continue; } - if (!_.find(this.nodes, function (n) { + if (!_.find(this.nodes, function(n) { return Utils.is_intercepted({x: x, y: y, width: node.width, height: node.height}, n); })) { node.x = x; @@ -267,15 +271,15 @@ return node; }; - GridStackEngine.prototype.remove_node = function (node) { + GridStackEngine.prototype.remove_node = function(node) { node._id = null; this.nodes = _.without(this.nodes, node); this._pack_nodes(); this._notify(node); }; - GridStackEngine.prototype.can_move_node = function (node, x, y, width, height) { - var has_locked = Boolean(_.find(this.nodes, function (n) { return n.locked })); + GridStackEngine.prototype.can_move_node = function(node, x, y, width, height) { + var has_locked = Boolean(_.find(this.nodes, function(n) { return n.locked })); if (!this.height && !has_locked) return true; @@ -286,21 +290,29 @@ null, this.float, 0, - _.map(this.nodes, function (n) { if (n == node) { cloned_node = $.extend({}, n); return cloned_node; } return $.extend({}, n) })); + _.map(this.nodes, function(n) { + if (n == node) { + cloned_node = $.extend({}, n); + return cloned_node; + } + return $.extend({}, n); + })); clone.move_node(cloned_node, x, y, width, height); var res = true; if (has_locked) - res &= !Boolean(_.find(clone.nodes, function (n) { return n != cloned_node && Boolean(n.locked) && Boolean(n._dirty); })); + res &= !Boolean(_.find(clone.nodes, function(n) { + return n != cloned_node && Boolean(n.locked) && Boolean(n._dirty); + })); if (this.height) res &= clone.get_grid_height() <= this.height; return res; }; - GridStackEngine.prototype.can_be_placed_with_respect_to_height = function (node) { + GridStackEngine.prototype.can_be_placed_with_respect_to_height = function(node) { if (!this.height) return true; @@ -309,12 +321,12 @@ null, this.float, 0, - _.map(this.nodes, function (n) { return $.extend({}, n) })); + _.map(this.nodes, function(n) { return $.extend({}, n) })); clone.add_node(node); return clone.get_grid_height() <= this.height; }; - GridStackEngine.prototype.move_node = function (node, x, y, width, height, no_pack) { + GridStackEngine.prototype.move_node = function(node, x, y, width, height, no_pack) { if (typeof x != 'number') x = node.x; if (typeof y != 'number') y = node.y; if (typeof width != 'number') width = node.width; @@ -347,28 +359,28 @@ return node; }; - GridStackEngine.prototype.get_grid_height = function () { - return _.reduce(this.nodes, function (memo, n) { return Math.max(memo, n.y + n.height); }, 0); + GridStackEngine.prototype.get_grid_height = function() { + return _.reduce(this.nodes, function(memo, n) { return Math.max(memo, n.y + n.height); }, 0); }; - GridStackEngine.prototype.begin_update = function (node) { - _.each(this.nodes, function (n) { + GridStackEngine.prototype.begin_update = function(node) { + _.each(this.nodes, function(n) { n._orig_y = n.y; }); node._updating = true; }; - GridStackEngine.prototype.end_update = function () { - _.each(this.nodes, function (n) { + GridStackEngine.prototype.end_update = function() { + _.each(this.nodes, function(n) { n._orig_y = n.y; }); - var n = _.find(this.nodes, function (n) { return n._updating; }); + var n = _.find(this.nodes, function(n) { return n._updating; }); if (n) { n._updating = false; } }; - var GridStack = function (el, opts) { + var GridStack = function(el, opts) { var self = this, one_column_mode; this.container = $(el); @@ -387,6 +399,7 @@ auto: true, min_width: 768, float: false, + static_grid: false, _class: 'grid-stack-' + (Math.random() * 10000).toFixed(0), animate: Boolean(this.container.attr('data-gs-animate')) || false, always_show_resize_handle: opts.always_show_resize_handle || false, @@ -403,15 +416,18 @@ this.opts.is_nested = is_nested; this.container.addClass(this.opts._class); + + this._set_static_class(); + if (is_nested) { this.container.addClass('grid-stack-nested'); } this._init_styles(); - this.grid = new GridStackEngine(this.opts.width, function (nodes) { + this.grid = new GridStackEngine(this.opts.width, function(nodes) { var max_height = 0; - _.each(nodes, function (n) { + _.each(nodes, function(n) { if (n._id == null) { n.el.remove(); } @@ -430,25 +446,29 @@ if (this.opts.auto) { var elements = []; var _this = this; - this.container.children('.' + this.opts.item_class).each(function (index, el) { + this.container.children('.' + this.opts.item_class).each(function(index, el) { el = $(el); elements.push({ el: el, - i: parseInt(el.attr('data-gs-x')) + parseInt(el.attr('data-gs-y')) * _this.opts.width // Use opts.width as weight for Y + i: parseInt(el.attr('data-gs-x')) + parseInt(el.attr('data-gs-y')) * _this.opts.width }); }); - _.chain(elements).sortBy(function (x) { return x.i; }).each(function (i) { + _.chain(elements).sortBy(function(x) { return x.i; }).each(function(i) { self._prepare_element(i.el); }).value(); } this.set_animation(this.opts.animate); - this.placeholder = $('
').hide(); - this.container.append(this.placeholder); - this.container.height((this.grid.get_grid_height()) * (this.opts.cell_height + this.opts.vertical_margin) - this.opts.vertical_margin); + this.placeholder = $( + '
' + + '
').hide(); - var on_resize_handler = function () { + this.container.height( + this.grid.get_grid_height() * (this.opts.cell_height + this.opts.vertical_margin) - + this.opts.vertical_margin); + + this.on_resize_handler = function() { if (self._is_one_column_mode()) { if (one_column_mode) return; @@ -456,9 +476,12 @@ one_column_mode = true; self.grid._sort_nodes(); - _.each(self.grid.nodes, function (node) { + _.each(self.grid.nodes, function(node) { self.container.append(node.el); + if (self.opts.static_grid) { + return; + } if (!node.no_move) { node.el.draggable('disable'); } @@ -473,7 +496,11 @@ one_column_mode = false; - _.each(self.grid.nodes, function (node) { + if (self.opts.static_grid) { + return; + } + + _.each(self.grid.nodes, function(node) { if (!node.no_move) { node.el.draggable('enable'); } @@ -484,11 +511,26 @@ } }; - $(window).resize(on_resize_handler); - on_resize_handler(); + $(window).resize(this.on_resize_handler); + this.on_resize_handler(); + }; + + GridStack.prototype._trigger_change_event = function(forceTrigger) { + var elements = this.grid.get_dirty_nodes(); + var hasChanges = false; + + var eventParams = []; + if (elements && elements.length) { + eventParams.push(elements); + hasChanges = true; + } + + if (hasChanges || forceTrigger === true) { + this.container.trigger('change', eventParams); + } }; - GridStack.prototype._init_styles = function () { + GridStack.prototype._init_styles = function() { if (this._styles_id) { $('[data-gs-id="' + this._styles_id + '"]').remove(); } @@ -498,7 +540,7 @@ this._styles._max = 0; }; - GridStack.prototype._update_styles = function (max_height) { + GridStack.prototype._update_styles = function(max_height) { if (this._styles == null) { return; } @@ -542,18 +584,21 @@ } }; - GridStack.prototype._update_container_height = function () { + GridStack.prototype._update_container_height = function() { if (this.grid._update_counter) { return; } - this.container.height(this.grid.get_grid_height() * (this.opts.cell_height + this.opts.vertical_margin) - this.opts.vertical_margin); + this.container.height( + this.grid.get_grid_height() * (this.opts.cell_height + this.opts.vertical_margin) - + this.opts.vertical_margin); }; - GridStack.prototype._is_one_column_mode = function () { - return (window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth) <= this.opts.min_width; + GridStack.prototype._is_one_column_mode = function() { + return (window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth) <= + this.opts.min_width; }; - GridStack.prototype._prepare_element = function (el) { + GridStack.prototype._prepare_element = function(el) { var self = this; el = $(el); @@ -576,9 +621,14 @@ }); el.data('_gridstack_node', node); + if (self.opts.static_grid) { + return; + } + var cell_width, cell_height; - var on_start_moving = function (event, ui) { + var on_start_moving = function(event, ui) { + self.container.append(self.placeholder); var o = $(this); self.grid.clean_nodes(); self.grid.begin_update(node); @@ -596,7 +646,8 @@ el.resizable('option', 'minHeight', self.opts.cell_height * (node.min_height || 1)); }; - var on_end_moving = function (event, ui) { + var on_end_moving = function(event, ui) { + self.placeholder.detach(); var o = $(this); node.el = o; self.placeholder.hide(); @@ -607,7 +658,7 @@ .attr('data-gs-height', node.height) .removeAttr('style'); self._update_container_height(); - self.container.trigger('change', [self.grid.get_dirty_nodes()]); + self._trigger_change_event(); self.grid.end_update(); }; @@ -615,9 +666,9 @@ el.draggable(_.extend(this.opts.draggable, { start: on_start_moving, stop: on_end_moving, - drag: function (event, ui) { + drag: function(event, ui) { var x = Math.round(ui.position.left / cell_width), - y = Math.floor((ui.position.top + cell_height/2) / cell_height); + y = Math.floor((ui.position.top + cell_height / 2) / cell_height); if (!self.grid.can_move_node(node, x, y, node.width, node.height)) { return; } @@ -628,9 +679,9 @@ })).resizable(_.extend(this.opts.resizable, { start: on_start_moving, stop: on_end_moving, - resize: function (event, ui) { + resize: function(event, ui) { var x = Math.round(ui.position.left / cell_width), - y = Math.floor((ui.position.top + cell_height/2) / cell_height), + y = Math.floor((ui.position.top + cell_height / 2) / cell_height), width = Math.round(ui.size.width / cell_width), height = Math.round(ui.size.height / cell_height); if (!self.grid.can_move_node(node, x, y, width, height)) { @@ -652,7 +703,7 @@ el.attr('data-gs-locked', node.locked ? 'yes' : null); }; - GridStack.prototype.set_animation = function (enable) { + GridStack.prototype.set_animation = function(enable) { if (enable) { this.container.addClass('grid-stack-animate'); } @@ -661,7 +712,7 @@ } }; - GridStack.prototype.add_widget = function (el, x, y, width, height, auto_position) { + GridStack.prototype.add_widget = function(el, x, y, width, height, auto_position) { el = $(el); if (typeof x != 'undefined') el.attr('data-gs-x', x); if (typeof y != 'undefined') el.attr('data-gs-y', y); @@ -671,16 +722,17 @@ this.container.append(el); this._prepare_element(el); this._update_container_height(); + this._trigger_change_event(true); return el; }; - GridStack.prototype.will_it_fit = function (x, y, width, height, auto_position) { + GridStack.prototype.will_it_fit = function(x, y, width, height, auto_position) { var node = {x: x, y: y, width: width, height: height, auto_position: auto_position}; return this.grid.can_be_placed_with_respect_to_height(node); }; - GridStack.prototype.remove_widget = function (el, detach_node) { + GridStack.prototype.remove_widget = function(el, detach_node) { detach_node = typeof detach_node === 'undefined' ? true : detach_node; el = $(el); var node = el.data('_gridstack_node'); @@ -689,20 +741,30 @@ this._update_container_height(); if (detach_node) el.remove(); + this._trigger_change_event(true); }; - GridStack.prototype.remove_all = function (detach_node) { - _.each(this.grid.nodes, function (node) { + GridStack.prototype.remove_all = function(detach_node) { + _.each(this.grid.nodes, function(node) { this.remove_widget(node.el, detach_node); }, this); this.grid.nodes = []; this._update_container_height(); }; - GridStack.prototype.resizable = function (el, val) { + GridStack.prototype.destroy = function() { + $(window).off("resize", this.on_resize_handler); + this.disable(); + this.container.remove(); + Utils.remove_stylesheet(this._styles_id); + if (this.grid) + this.grid = null; + }; + + GridStack.prototype.resizable = function(el, val) { var self = this; el = $(el); - el.each(function (index, el) { + el.each(function(index, el) { el = $(el); var node = el.data('_gridstack_node'); if (typeof node == 'undefined' || node == null) { @@ -720,10 +782,10 @@ return this; }; - GridStack.prototype.movable = function (el, val) { + GridStack.prototype.movable = function(el, val) { var self = this; el = $(el); - el.each(function (index, el) { + el.each(function(index, el) { el = $(el); var node = el.data('_gridstack_node'); if (typeof node == 'undefined' || node == null) { @@ -741,19 +803,19 @@ return this; }; - GridStack.prototype.disable = function () { + GridStack.prototype.disable = function() { this.movable(this.container.children('.' + this.opts.item_class), false); this.resizable(this.container.children('.' + this.opts.item_class), false); }; - GridStack.prototype.enable = function () { + GridStack.prototype.enable = function() { this.movable(this.container.children('.' + this.opts.item_class), true); this.resizable(this.container.children('.' + this.opts.item_class), true); }; - GridStack.prototype.locked = function (el, val) { + GridStack.prototype.locked = function(el, val) { el = $(el); - el.each(function (index, el) { + el.each(function(index, el) { el = $(el); var node = el.data('_gridstack_node'); if (typeof node == 'undefined' || node == null) { @@ -766,7 +828,41 @@ return this; }; - GridStack.prototype._update_element = function (el, callback) { + GridStack.prototype.min_height = function (el, val) { + el = $(el); + el.each(function (index, el) { + el = $(el); + var node = el.data('_gridstack_node'); + if (typeof node == 'undefined' || node == null) { + return; + } + + if(!isNaN(val)){ + node.min_height = (val || false); + el.attr('data-gs-min-height', val); + } + }); + return this; + }; + + GridStack.prototype.min_width = function (el, val) { + el = $(el); + el.each(function (index, el) { + el = $(el); + var node = el.data('_gridstack_node'); + if (typeof node == 'undefined' || node == null) { + return; + } + + if(!isNaN(val)){ + node.min_width = (val || false); + el.attr('data-gs-min-width', val); + } + }); + return this; + }; + + GridStack.prototype._update_element = function(el, callback) { el = $(el).first(); var node = el.data('_gridstack_node'); if (typeof node == 'undefined' || node == null) { @@ -781,13 +877,13 @@ callback.call(this, el, node); self._update_container_height(); - self.container.trigger('change', [self.grid.get_dirty_nodes()]); + self._trigger_change_event(); self.grid.end_update(); }; - GridStack.prototype.resize = function (el, width, height) { - this._update_element(el, function (el, node) { + GridStack.prototype.resize = function(el, width, height) { + this._update_element(el, function(el, node) { width = (width != null && typeof width != 'undefined') ? width : node.width; height = (height != null && typeof height != 'undefined') ? height : node.height; @@ -795,8 +891,8 @@ }); }; - GridStack.prototype.move = function (el, x, y) { - this._update_element(el, function (el, node) { + GridStack.prototype.move = function(el, x, y) { + this._update_element(el, function(el, node) { x = (x != null && typeof x != 'undefined') ? x : node.x; y = (y != null && typeof y != 'undefined') ? y : node.y; @@ -804,8 +900,8 @@ }); }; - GridStack.prototype.update = function (el, x, y, width, height) { - this._update_element(el, function (el, node) { + GridStack.prototype.update = function(el, x, y, width, height) { + this._update_element(el, function(el, node) { x = (x != null && typeof x != 'undefined') ? x : node.x; y = (y != null && typeof y != 'undefined') ? y : node.y; width = (width != null && typeof width != 'undefined') ? width : node.width; @@ -815,7 +911,7 @@ }); }; - GridStack.prototype.cell_height = function (val) { + GridStack.prototype.cell_height = function(val) { if (typeof val == 'undefined') { return this.opts.cell_height; } @@ -826,7 +922,7 @@ this._update_styles(); }; - GridStack.prototype.cell_width = function () { + GridStack.prototype.cell_width = function() { var o = this.container.children('.' + this.opts.item_class).first(); return Math.ceil(o.outerWidth() / o.attr('data-gs-width')); }; @@ -842,25 +938,40 @@ return {x: Math.floor(relativeLeft / column_width), y: Math.floor(relativeTop / row_height)}; }; - GridStack.prototype.batch_update = function () { + GridStack.prototype.batch_update = function() { this.grid.batch_update(); }; - GridStack.prototype.commit = function () { + GridStack.prototype.commit = function() { this.grid.commit(); - this._update_container_height() + this._update_container_height(); }; - GridStack.prototype.is_area_empty = function (x, y, width, height) { + GridStack.prototype.is_area_empty = function(x, y, width, height) { return this.grid.is_area_empty(x, y, width, height); }; + GridStack.prototype.set_static = function(static_value) { + this.opts.static_grid = (static_value === true); + this._set_static_class(); + }; + + GridStack.prototype._set_static_class = function() { + var static_class_name = 'grid-stack-static'; + + if (this.opts.static_grid === true) { + this.container.addClass(static_class_name); + } else { + this.container.removeClass(static_class_name); + } + }; + scope.GridStackUI = GridStack; scope.GridStackUI.Utils = Utils; - $.fn.gridstack = function (opts) { - return this.each(function () { + $.fn.gridstack = function(opts) { + return this.each(function() { if (!$(this).data('gridstack')) { $(this).data('gridstack', new GridStack(this, opts)); }