mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* Update index.d.ts Added missing jsdoc documentation for addWidget(). Also allow parameter id of addWidget() to be a string. Removed unneccessary whitespaces. * Documentation refinement of addWidget() function Refined the documentation (mainly to force rebuild on GitHub as the build system had trouble after the last commit) * Removed dt-header, altered documentation header Removed dt-header. Added version number and formated contributer list. Removed unneccessary documentation header in gridstack-test.ts.
22 lines
765 B
TypeScript
22 lines
765 B
TypeScript
/// <reference types="jquery"/>
|
|
|
|
var options: IGridstackOptions = {
|
|
float: true
|
|
};
|
|
var element: JQuery = $(document).gridstack(options);
|
|
var gridstack: GridStack = $(document).data("gridstack");
|
|
var gsFromElement: GridStack = element.data("gridstack");
|
|
|
|
if (gridstack !== gsFromElement) throw Error('These should match!');
|
|
|
|
gridstack.addWidget("test", 1, 2, 3, 4, true);
|
|
gridstack.addWidget(document.createElement('div'), 1, 2, 3, 4, true);
|
|
gridstack.addWidget($(document.createElement('div')), 1, 2, 3, 4, true);
|
|
gridstack.makeWidget($(document.createElement('div')));
|
|
gridstack.batchUpdate();
|
|
gridstack.cellHeight();;
|
|
gridstack.cellHeight(2);
|
|
gridstack.cellWidth();
|
|
gridstack.getCellFromPixel(<MousePosition>{ left:20, top: 20 });
|
|
gridstack.removeAll(false);
|