|
1 | | -// Type definitions for Gridstack 0.5 |
2 | | -// Project: http://gridstack.github.io/gridstack.js/ |
| 1 | +// Type definitions for Gridstack 0.5.2 |
| 2 | +// Project: https://gridstackjs.com/ |
3 | 3 | // Definitions by: Pascal Senn <https://github.com/PascalSenn> |
4 | 4 | // Ricky Blankenaufulland <https://github.com/ZoolWay> |
5 | 5 | // Sl1MBoy <https://github.com/Sl1MBoy> |
6 | 6 | // John Archer <https://github.com/JohnArcher> |
7 | 7 | // Alain Dumesny <https://github.com/adumesny> |
8 | | -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped |
9 | | -// TypeScript Version: 2.3 |
| 8 | +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped initially, but now part of gridstack.js |
| 9 | +// TypeScript Version: 2.8 |
10 | 10 |
|
11 | 11 | interface JQuery { |
12 | 12 | gridstack(options: GridstackOptions): JQuery; |
@@ -336,27 +336,27 @@ interface CellPosition { |
336 | 336 |
|
337 | 337 | /** |
338 | 338 | * Gridstack Widget creation options |
| 339 | + * @param {number} x widget position x (default?: 0) |
| 340 | + * @param {number} y widget position y (default?: 0) |
| 341 | + * @param {number} width widget dimension width (default?: 1) |
| 342 | + * @param {number} height widget dimension height (default?: 1) |
| 343 | + * @param {boolean} autoPosition if true then x, y parameters will be ignored and widget will be places on the first available position (default?: false) |
| 344 | + * @param {number} minWidth minimum width allowed during resize/creation (default?: undefined = un-constrained) |
| 345 | + * @param {number} maxWidth maximum width allowed during resize/creation (default?: undefined = un-constrained) |
| 346 | + * @param {number} minHeight minimum height allowed during resize/creation (default?: undefined = un-constrained) |
| 347 | + * @param {number} maxHeight maximum height allowed during resize/creation (default?: undefined = un-constrained) |
| 348 | + * @param {number | string} id value for `data-gs-id` stored on the widget (default?: undefined) |
339 | 349 | */ |
340 | 350 | interface GridstackWidget { |
341 | | - /** x position (default?: 0) */ |
342 | 351 | x?: number; |
343 | | - /** y position (default?: 0) */ |
344 | 352 | y?: number; |
345 | | - /** width (default?: 1) */ |
346 | 353 | width?: number; |
347 | | - /** height (default?: 1) */ |
348 | 354 | height?: number; |
349 | | - /** autoPosition if true then x, y parameters will be ignored and widget will be places on the first available position (default?: false) */ |
350 | 355 | autoPosition?: boolean; |
351 | | - /** minimum width allowed during resize/creation (default?: undefined = un-constrained) */ |
352 | 356 | minWidth?: number; |
353 | | - /** maximum width allowed during resize/creation (default?: undefined = un-constrained) */ |
354 | 357 | maxWidth?: number; |
355 | | - /** minimum height allowed during resize/creation (default?: undefined = un-constrained) */ |
356 | 358 | minHeight?: number; |
357 | | - /** maximum height allowed during resize/creation (default?: undefined = un-constrained) */ |
358 | 359 | maxHeight?: number; |
359 | | - /** id value for `data-gs-id` stored on the widget (default?: undefined)*/ |
360 | 360 | id?: number | string; |
361 | 361 | } |
362 | 362 |
|
|
0 commit comments