Skip to content

Commit 29857f4

Browse files
committed
update doc to be all functions in alphabetical order
1 parent 45d39a0 commit 29857f4

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

README.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ Join gridstack.js on Slack: https://gridstackjs.troolee.com
3333
- [enable(event)](#enableevent)
3434
- [API](#api)
3535
- [addWidget(el, x, y, width, height, autoPosition)](#addwidgetel-x-y-width-height-autoposition)
36-
- [makeWidget(el)](#makewidgetel)
3736
- [batchUpdate()](#batchupdate)
3837
- [cellHeight()](#cellheight)
3938
- [cellHeight(val)](#cellheightval)
@@ -45,6 +44,7 @@ Join gridstack.js on Slack: https://gridstackjs.troolee.com
4544
- [getCellFromPixel(position)](#getcellfrompixelposition)
4645
- [isAreaEmpty(x, y, width, height)](#isareaemptyx-y-width-height)
4746
- [locked(el, val)](#lockedel-val)
47+
- [makeWidget(el)](#makewidgetel)
4848
- [minWidth(el, val)](#minwidthel-val)
4949
- [minHeight(el, val)](#minheightel-val)
5050
- [movable(el, val)](#movableel-val)
@@ -295,23 +295,6 @@ var grid = $('.grid-stack').data('gridstack');
295295
grid.addWidget(el, 0, 0, 3, 2, true);
296296
```
297297

298-
### makeWidget(el)
299-
300-
If you add elements to your gridstack container by hand, you have to tell gridstack afterwards to make them widgets. If you want gridstack to add the elements for you, use `add_widget` instead.
301-
Makes the given element a widget and returns it.
302-
303-
Parameters:
304-
305-
- `el` - element to convert to a widget
306-
307-
```javascript
308-
$('.grid-stack').gridstack();
309-
310-
$('.grid-stack').append('<div id="gsi-1" data-gs-x="0" data-gs-y="0" data-gs-width="3" data-gs-height="2" data-gs-auto-position="1"></div>')
311-
var grid = $('.grid-stack').data('gridstack');
312-
grid.makeWidget('gsi-1');
313-
```
314-
315298
### batchUpdate()
316299

317300
Initailizes batch updates. You will see no changes until `commit` method is called.
@@ -380,6 +363,23 @@ Locks/unlocks widget.
380363
- `el` - widget to modify.
381364
- `val` - if `true` widget will be locked.
382365

366+
### makeWidget(el)
367+
368+
If you add elements to your gridstack container by hand, you have to tell gridstack afterwards to make them widgets. If you want gridstack to add the elements for you, use `add_widget` instead.
369+
Makes the given element a widget and returns it.
370+
371+
Parameters:
372+
373+
- `el` - element to convert to a widget
374+
375+
```javascript
376+
$('.grid-stack').gridstack();
377+
378+
$('.grid-stack').append('<div id="gsi-1" data-gs-x="0" data-gs-y="0" data-gs-width="3" data-gs-height="2" data-gs-auto-position="1"></div>')
379+
var grid = $('.grid-stack').data('gridstack');
380+
grid.makeWidget('gsi-1');
381+
```
382+
383383
### minWidth(el, val)
384384

385385
Set the minWidth for a widget.

0 commit comments

Comments
 (0)