corrected the errors in the file

This commit is contained in:
Pascal Senn (GIAPSE)
2015-09-18 10:47:59 +02:00
parent e24b322713
commit 42cc0324d7
2 changed files with 24 additions and 24 deletions

View File

@@ -1,6 +1,6 @@
// Type definitions for Gridstack
// Project: http://troolee.github.io/gridstack.js/
// Definitions by: Pascal Senn <https://github.com/PascalSenn/>
// Definitions by: Pascal Senn <https://github.com/PascalSenn/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
interface JQuery {
@@ -22,18 +22,18 @@ interface GridStack {
*/
add_widget(el: string, x: number, y: number, width: number, height: number, auto_position: boolean): JQuery
/**
* Initailizes batch updates. You will see no changes until commit method is called.
* Initializes batch updates. You will see no changes until commit method is called.
*/
batch_update()
batch_update():void
/**
* Gets current cell height.
*/
cell_height():number
/**
* Update current cell height. This method rebuilds an internal CSS stylesheet. Note: You can expect performance issues if call this method too often.
* Update current cell height. This method rebuilds an internal CSS style sheet. Note: You can expect performance issues if call this method too often.
* @param {number} val the cell height
*/
cell_height(val:number)
cell_height(val:number):void
/**
* Gets current cell width.
*/
@@ -41,19 +41,19 @@ interface GridStack {
/**
* Finishes batch updates. Updates DOM nodes. You must call it after batch_update.
*/
commit()
commit():void
/**
* Destroys a grid instance.
*/
destroy()
destroy(): void
/*
* Disables widgets moving/resizing.
*/
disable()
disable(): void
/*
* Enables widgets moving/resizing.
*/
enable()
enable(): void
/*
* Get the position of the cell under a pixel on screen.
* @param {MousePosition} position the position of the pixel to resolve in absolute coordinates, as an object with top and leftproperties
@@ -66,31 +66,31 @@ interface GridStack {
* @param {number} width the width of to check
* @param {number} height the height of to check
*/
is_area_empty(x: number, y: number, width: number, height: number)
is_area_empty(x: number, y: number, width: number, height: number): void
/*
* Locks/unlocks widget.
* @param {HTMLElement} el widget to modify.
* @param {boolean} val if true widget will be locked.
*/
locked(el: HTMLElement, val: boolean)
locked(el: HTMLElement, val: boolean): void
/*
* Set the minWidth for a widget.
* @param {HTMLElement} el widget to modify.
* @param {number} val A numeric value of the number of columns
*/
min_width(el: HTMLElement, val: number)
min_width(el: HTMLElement, val: number): void
/*
* Set the minHeight for a widget.
* @param {HTMLElement} el widget to modify.
* @param {number} val A numeric value of the number of rows
*/
min_height(el: HTMLElement, val: number)
min_height(el: HTMLElement, val: number): void
/*
* Enables/Disables moving.
* @param {HTMLElement} el widget to modify.
* @param {number} val if true widget will be draggable.
*/
movable(el: HTMLElement, val: boolean)
movable(el: HTMLElement, val: boolean): void
/**
* Changes widget position
* @param {HTMLElement} el widget to modify
@@ -98,35 +98,35 @@ interface GridStack {
* @param {number} y new position y. If value is null or undefined it will be ignored.
*
*/
move(el: HTMLElement, x: number, y: number)
move(el: HTMLElement, x: number, y: number): void
/**
* Removes widget from the grid.
* @param {HTMLElement} el widget to modify
* @param {boolean} detach_node if false DOM node won't be removed from the tree (Optional. Default true).
*/
remove_widget(el: HTMLElement, detach_node?:boolean)
remove_widget(el: HTMLElement, detach_node?: boolean): void
/**
* Removes all widgets from the grid.
*/
remove_all()
remove_all(): void
/**
* Changes widget size
* @param {HTMLElement} el widget to modify
* @param {number} width new dimensions width. If value is null or undefined it will be ignored.
* @param {number} height new dimensions height. If value is null or undefined it will be ignored.
*/
resize(el: HTMLElement, width: number, height: number)
resize(el: HTMLElement, width: number, height: number): void
/**
* Enables/Disables resizing.
* @param {HTMLElement} el widget to modify
* @param {boolean} val if true widget will be resizable.
*/
resizable(el: HTMLElement, val:boolean)
resizable(el: HTMLElement, val: boolean): void
/**
* Toggle the grid static state. Also toggle the grid-stack-static class.
* @param {boolean} static_value if true the grid become static.
*/
set_static(static_value:boolean)
set_static(static_value: boolean): void
/**
* Updates widget position/size.
* @param {HTMLElement} el widget to modify
@@ -135,7 +135,7 @@ interface GridStack {
* @param {number} width new dimensions width. If value is null or undefined it will be ignored.
* @param {number} height new dimensions height. If value is null or undefined it will be ignored.
*/
update(el: HTMLElement, x: number, y: number, width: number, height: number)
update(el: HTMLElement, x: number, y: number, width: number, height: number): void
/**
* Returns true if the height of the grid will be less the vertical constraint. Always returns true if grid doesn't have height constraint.
* @param {number} x new position x. If value is null or undefined it will be ignored.
@@ -170,7 +170,7 @@ declare module GridStackUI {
*@param dir 1 for asc, -1 for desc (optional)
*@param width width of the grid. If undefined the width will be calculated automatically (optional).
**/
sort(nodes:HTMLElement[], dir:number, width:number)
sort(nodes: HTMLElement[], dir: number, width: number): void
}
}
/**