Skip to content

Commit c938a79

Browse files
author
Marek Sierociński
committed
README.md - Documentation - GridLayout
1 parent b52b5e2 commit c938a79

File tree

1 file changed

+97
-0
lines changed

1 file changed

+97
-0
lines changed

README.md

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,103 @@ or include the script in your html (download from [releases](https://github.com/
133133

134134
#### Properties
135135

136+
##### GridLayout
137+
138+
* **layout**
139+
140+
* type: `Array`
141+
* required: `true`
142+
143+
This is the initial layout of the grid.
144+
145+
The value must be an `Array` of `Object` items. Each item must have `i`, `x`, `y`, `w` and `h` proprties. Please refer to `GridItem` documentation below for more informations.
146+
147+
* **colNum**
148+
149+
* type: `Number`
150+
* required: `false`
151+
* default: `12`
152+
153+
Says how many columns the grid has.
154+
155+
The value should be a _natural number_.
156+
157+
* **rowHeight**
158+
159+
* type: `Number`
160+
* required: `false`
161+
* default: `150`
162+
163+
Says what is a height of a single row in pixels.
164+
165+
* **maxRows**
166+
167+
* type: `Number`
168+
* required: `false`
169+
* default: `Infinity`
170+
171+
Says what is a maximal number of rows in the grid.
172+
173+
* **margin**
174+
175+
* type: `Array`
176+
* required: `false`
177+
* default: `[10, 10]`
178+
179+
Says what are the margins of elements inside the grid.
180+
181+
The value must be a two-element `Array` of `Number`. Each value is expressed in pixels. The first element is a margin horizontally, the second element is a vertical margin.
182+
183+
* **isDraggable**
184+
185+
* type: `Boolean`
186+
* required: `false`
187+
* default: `true`
188+
189+
Says if the grids items are draggable.
190+
191+
* **isResizable**
192+
193+
* type: `Boolean`
194+
* required: `false`
195+
* default: `true`
196+
197+
Says if the grids items are resizable.
198+
199+
* **isMirrored**
200+
201+
* type: `Boolean`
202+
* required: `false`
203+
* default: `false`
204+
205+
Says if the RTL/LTR should be reversed.
206+
207+
* **autoSize**
208+
209+
* type: `Boolean`
210+
* required: `false`
211+
* default: `true`
212+
213+
Says if the container height should swells and contracts to fit contents.
214+
215+
* **verticalCompact**
216+
217+
* type: `Boolean`
218+
* required: `false`
219+
* default: `true`
220+
221+
Says if the layout should be compact vertically.
222+
223+
* **useCssTransforms**
224+
225+
* type: `Boolean`
226+
* required: `false`
227+
* default: `true`
228+
229+
Says if the CSS `transition-property: transform;` should be used.
230+
231+
232+
136233
##### GridItem
137234

138235
* **i**

0 commit comments

Comments
 (0)