From 29857f41312e69d76d1d1eaef75a3e8a00b6661d Mon Sep 17 00:00:00 2001 From: Pavel Reznikov Date: Wed, 17 Feb 2016 18:50:59 -0800 Subject: [PATCH] update doc to be all functions in alphabetical order --- README.md | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 21f87ac..e51328f 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,6 @@ Join gridstack.js on Slack: https://gridstackjs.troolee.com - [enable(event)](#enableevent) - [API](#api) - [addWidget(el, x, y, width, height, autoPosition)](#addwidgetel-x-y-width-height-autoposition) - - [makeWidget(el)](#makewidgetel) - [batchUpdate()](#batchupdate) - [cellHeight()](#cellheight) - [cellHeight(val)](#cellheightval) @@ -45,6 +44,7 @@ Join gridstack.js on Slack: https://gridstackjs.troolee.com - [getCellFromPixel(position)](#getcellfrompixelposition) - [isAreaEmpty(x, y, width, height)](#isareaemptyx-y-width-height) - [locked(el, val)](#lockedel-val) + - [makeWidget(el)](#makewidgetel) - [minWidth(el, val)](#minwidthel-val) - [minHeight(el, val)](#minheightel-val) - [movable(el, val)](#movableel-val) @@ -295,23 +295,6 @@ var grid = $('.grid-stack').data('gridstack'); grid.addWidget(el, 0, 0, 3, 2, true); ``` -### makeWidget(el) - -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. -Makes the given element a widget and returns it. - -Parameters: - -- `el` - element to convert to a widget - -```javascript -$('.grid-stack').gridstack(); - -$('.grid-stack').append('
') -var grid = $('.grid-stack').data('gridstack'); -grid.makeWidget('gsi-1'); -``` - ### batchUpdate() Initailizes batch updates. You will see no changes until `commit` method is called. @@ -380,6 +363,23 @@ Locks/unlocks widget. - `el` - widget to modify. - `val` - if `true` widget will be locked. +### makeWidget(el) + +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. +Makes the given element a widget and returns it. + +Parameters: + +- `el` - element to convert to a widget + +```javascript +$('.grid-stack').gridstack(); + +$('.grid-stack').append('
') +var grid = $('.grid-stack').data('gridstack'); +grid.makeWidget('gsi-1'); +``` + ### minWidth(el, val) Set the minWidth for a widget.