gridstack 12.4.2 → 12.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/dist/angular/esm2020/lib/base-widget.mjs +2 -2
  2. package/dist/angular/esm2020/lib/gridstack-item.component.mjs +2 -2
  3. package/dist/angular/esm2020/lib/gridstack.component.mjs +2 -2
  4. package/dist/angular/esm2020/lib/gridstack.module.mjs +2 -2
  5. package/dist/angular/esm2020/lib/types.mjs +2 -2
  6. package/dist/angular/fesm2015/gridstack-angular.mjs +4 -4
  7. package/dist/angular/fesm2015/gridstack-angular.mjs.map +1 -1
  8. package/dist/angular/fesm2020/gridstack-angular.mjs +5 -5
  9. package/dist/angular/fesm2020/gridstack-angular.mjs.map +1 -1
  10. package/dist/angular/lib/gridstack-item.component.d.ts +1 -1
  11. package/dist/angular/lib/gridstack.component.d.ts +1 -1
  12. package/dist/angular/lib/types.d.ts +1 -1
  13. package/dist/angular/package.json +1 -1
  14. package/dist/angular/src/base-widget.ts +1 -1
  15. package/dist/angular/src/gridstack-item.component.ts +1 -1
  16. package/dist/angular/src/gridstack.component.ts +1 -1
  17. package/dist/angular/src/gridstack.module.ts +1 -1
  18. package/dist/angular/src/types.ts +1 -1
  19. package/dist/dd-base-impl.d.ts +1 -1
  20. package/dist/dd-base-impl.js +1 -1
  21. package/dist/dd-base-impl.js.map +1 -1
  22. package/dist/dd-draggable.d.ts +5 -1
  23. package/dist/dd-draggable.js +110 -15
  24. package/dist/dd-draggable.js.map +1 -1
  25. package/dist/dd-droppable.d.ts +1 -1
  26. package/dist/dd-droppable.js +7 -3
  27. package/dist/dd-droppable.js.map +1 -1
  28. package/dist/dd-element.d.ts +1 -1
  29. package/dist/dd-element.js +1 -1
  30. package/dist/dd-element.js.map +1 -1
  31. package/dist/dd-gridstack.d.ts +2 -1
  32. package/dist/dd-gridstack.js +6 -3
  33. package/dist/dd-gridstack.js.map +1 -1
  34. package/dist/dd-manager.d.ts +1 -1
  35. package/dist/dd-manager.js +1 -1
  36. package/dist/dd-manager.js.map +1 -1
  37. package/dist/dd-resizable-handle.d.ts +1 -1
  38. package/dist/dd-resizable-handle.js +1 -1
  39. package/dist/dd-resizable-handle.js.map +1 -1
  40. package/dist/dd-resizable.d.ts +2 -1
  41. package/dist/dd-resizable.js +46 -14
  42. package/dist/dd-resizable.js.map +1 -1
  43. package/dist/dd-touch.d.ts +1 -1
  44. package/dist/dd-touch.js +1 -1
  45. package/dist/dd-touch.js.map +1 -1
  46. package/dist/gridstack-all.js +1 -1
  47. package/dist/gridstack-all.js.LICENSE.txt +1 -1
  48. package/dist/gridstack-all.js.map +1 -1
  49. package/dist/gridstack-engine.d.ts +1 -1
  50. package/dist/gridstack-engine.js +1 -1
  51. package/dist/gridstack-engine.js.map +1 -1
  52. package/dist/gridstack.css +17 -6
  53. package/dist/gridstack.d.ts +1 -1
  54. package/dist/gridstack.js +29 -18
  55. package/dist/gridstack.js.map +1 -1
  56. package/dist/gridstack.min.css +1 -1
  57. package/dist/types.d.ts +12 -1
  58. package/dist/types.js +1 -1
  59. package/dist/types.js.map +1 -1
  60. package/dist/utils.d.ts +1 -1
  61. package/dist/utils.js +4 -36
  62. package/dist/utils.js.map +1 -1
  63. package/doc/API.md +428 -390
  64. package/package.json +1 -1
package/doc/API.md CHANGED
@@ -1,4 +1,4 @@
1
- # gridstack v12.4.2
1
+ # gridstack v12.6.0
2
2
 
3
3
  ## Classes
4
4
 
@@ -31,6 +31,7 @@
31
31
  - [GridHTMLElement](#gridhtmlelement)
32
32
  - [GridItemHTMLElement](#griditemhtmlelement)
33
33
  - [GridStackEngineOptions](#gridstackengineoptions)
34
+ - [GridStackMouseEvent](#gridstackmouseevent)
34
35
  - [GridStackMoveOpts](#gridstackmoveopts)
35
36
  - [GridStackNode](#gridstacknode-2)
36
37
  - [GridStackPosition](#gridstackposition)
@@ -67,18 +68,18 @@
67
68
  <a id="gridstack"></a>
68
69
  ### GridStack
69
70
 
70
- Defined in: [gridstack.ts:76](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L76)
71
+ Defined in: [gridstack.ts:77](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L77)
71
72
 
72
- Main gridstack class - you will need to call `GridStack.init()` first to initialize your grid.
73
+ Main gridstack class - you will need to call `GridStack.init()` first to initialize your grid.
73
74
  Note: your grid elements MUST have the following classes for the CSS layout to work:
74
75
 
75
76
  #### Example
76
77
 
77
78
  ```ts
78
- <div class="grid-stack">
79
- <div class="grid-stack-item">
80
- <div class="grid-stack-item-content">Item 1</div>
81
- </div>
79
+ <div class="grid-stack">
80
+ <div class="grid-stack-item">
81
+ <div class="grid-stack-item-content">Item 1</div>
82
+ </div>
82
83
  </div>
83
84
  ```
84
85
 
@@ -113,7 +114,7 @@ Construct a grid item from the given element and options
113
114
  protected _updateResizeEvent(forceRemove): GridStack;
114
115
  ```
115
116
 
116
- Defined in: [gridstack.ts:2085](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L2085)
117
+ Defined in: [gridstack.ts:2088](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L2088)
117
118
 
118
119
  add or remove the grid element size event handler
119
120
 
@@ -153,10 +154,10 @@ return our expected width (or parent) , and optionally of window for dynamic col
153
154
  static addGrid(parent, opt): GridStack;
154
155
  ```
155
156
 
156
- Defined in: [gridstack.ts:141](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L141)
157
+ Defined in: [gridstack.ts:142](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L142)
157
158
 
158
- call to create a grid with the given options, including loading any children from JSON structure. This will call GridStack.init(), then
159
- grid.load() on any passed children (recursively). Great alternative to calling init() if you want entire grid to come from
159
+ call to create a grid with the given options, including loading any children from JSON structure. This will call GridStack.init(), then
160
+ grid.load() on any passed children (recursively). Great alternative to calling init() if you want entire grid to come from
160
161
  JSON serialized data, including options.
161
162
 
162
163
  ###### Parameters
@@ -180,8 +181,8 @@ Defined in: [gridstack.ts:432](https://github.com/adumesny/gridstack.js/blob/mas
180
181
 
181
182
  add a new widget and returns it.
182
183
 
183
- Widget will be always placed even if result height is more than actual grid height.
184
- You need to use `willItFit()` before calling addWidget for additional check.
184
+ Widget will be always placed even if result height is more than actual grid height.
185
+ You need to use `willItFit()` before calling addWidget for additional check.
185
186
  See also `makeWidget(el)` for DOM element.
186
187
 
187
188
  ###### Parameters
@@ -197,7 +198,7 @@ See also `makeWidget(el)` for DOM element.
197
198
  ###### Example
198
199
 
199
200
  ```ts
200
- const grid = GridStack.init();
201
+ const grid = GridStack.init();
201
202
  grid.addWidget({w: 3, content: 'hello'});
202
203
  ```
203
204
 
@@ -209,7 +210,7 @@ batchUpdate(flag): GridStack;
209
210
 
210
211
  Defined in: [gridstack.ts:833](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L833)
211
212
 
212
- use before calling a bunch of `addWidget()` to prevent un-necessary relayouts in between (more efficient)
213
+ use before calling a bunch of `addWidget()` to prevent un-necessary relayouts in between (more efficient)
213
214
  and get a single event callback. You will see no changes until `batchUpdate(false)` is called.
214
215
 
215
216
  ###### Parameters
@@ -247,10 +248,10 @@ the grid instance for chaining
247
248
  ###### Example
248
249
 
249
250
  ```ts
250
- grid.cellHeight(100); // 100px height
251
- grid.cellHeight('70px'); // explicit pixel height
252
- grid.cellHeight('5rem'); // relative to root font size
253
- grid.cellHeight(grid.cellWidth() * 1.2); // aspect ratio
251
+ grid.cellHeight(100); // 100px height
252
+ grid.cellHeight('70px'); // explicit pixel height
253
+ grid.cellHeight('5rem'); // relative to root font size
254
+ grid.cellHeight(grid.cellWidth() * 1.2); // aspect ratio
254
255
  grid.cellHeight('auto'); // auto-size based on content
255
256
  ```
256
257
 
@@ -273,10 +274,10 @@ the cell width in pixels
273
274
  ###### Example
274
275
 
275
276
  ```ts
276
- const width = grid.cellWidth();
277
+ const width = grid.cellWidth();
277
278
  console.log('Cell width:', width, 'px');
278
279
 
279
- // Use cell width to calculate widget dimensions
280
+ // Use cell width to calculate widget dimensions
280
281
  const widgetWidth = width * 3; // For a 3-column wide widget
281
282
  ```
282
283
 
@@ -302,11 +303,11 @@ column(column, layout): GridStack;
302
303
 
303
304
  Defined in: [gridstack.ts:1041](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L1041)
304
305
 
305
- Set the number of columns in the grid. Will update existing widgets to conform to new number of columns,
306
+ Set the number of columns in the grid. Will update existing widgets to conform to new number of columns,
306
307
  as well as cache the original layout so you can revert back to previous positions without loss.
307
308
 
308
- Requires `gridstack-extra.css` or `gridstack-extra.min.css` for [2-11] columns,
309
- else you will need to generate correct CSS.
309
+ Requires `gridstack-extra.css` or `gridstack-extra.min.css` for [2-11] columns,
310
+ else you will need to generate correct CSS.
310
311
  See: https://github.com/gridstack/gridstack.js#change-grid-columns
311
312
 
312
313
  ###### Parameters
@@ -325,13 +326,13 @@ the grid instance for chaining
325
326
  ###### Example
326
327
 
327
328
  ```ts
328
- // Change to 6 columns with default scaling
329
+ // Change to 6 columns with default scaling
329
330
  grid.column(6);
330
331
 
331
- // Change to 4 columns, only move positions
332
+ // Change to 4 columns, only move positions
332
333
  grid.column(4, 'move');
333
334
 
334
- // Single column layout (vertical stack)
335
+ // Single column layout (vertical stack)
335
336
  grid.column(1);
336
337
  ```
337
338
 
@@ -343,7 +344,7 @@ compact(layout, doSort): GridStack;
343
344
 
344
345
  Defined in: [gridstack.ts:1007](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L1007)
345
346
 
346
- Re-layout grid items to reclaim any empty space. This is useful after removing widgets
347
+ Re-layout grid items to reclaim any empty space. This is useful after removing widgets
347
348
  or when you want to optimize the layout.
348
349
 
349
350
  ###### Parameters
@@ -362,14 +363,14 @@ the grid instance for chaining
362
363
  ###### Example
363
364
 
364
365
  ```ts
365
- // Compact layout after removing widgets
366
- grid.removeWidget('.widget-to-remove');
366
+ // Compact layout after removing widgets
367
+ grid.removeWidget('.widget-to-remove');
367
368
  grid.compact();
368
369
 
369
- // Use list layout (preserve order)
370
+ // Use list layout (preserve order)
370
371
  grid.compact('list');
371
372
 
372
- // Compact without sorting first
373
+ // Compact without sorting first
373
374
  grid.compact('compact', false);
374
375
  ```
375
376
 
@@ -427,17 +428,17 @@ Destroys a grid instance. DO NOT CALL any methods or access any vars after this
427
428
  disable(recurse): GridStack;
428
429
  ```
429
430
 
430
- Defined in: [gridstack.ts:2286](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L2286)
431
+ Defined in: [gridstack.ts:2289](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L2289)
431
432
 
432
- Temporarily disables widgets moving/resizing.
433
+ Temporarily disables widgets moving/resizing.
433
434
  If you want a more permanent way (which freezes up resources) use `setStatic(true)` instead.
434
435
 
435
436
  Note: This is a no-op for static grids.
436
437
 
437
- This is a shortcut for:
438
- ```typescript
439
- grid.enableMove(false);
440
- grid.enableResize(false);
438
+ This is a shortcut for:
439
+ ```typescript
440
+ grid.enableMove(false);
441
+ grid.enableResize(false);
441
442
  ```
442
443
 
443
444
  ###### Parameters
@@ -455,10 +456,10 @@ the grid instance for chaining
455
456
  ###### Example
456
457
 
457
458
  ```ts
458
- // Disable all interactions
459
+ // Disable all interactions
459
460
  grid.disable();
460
461
 
461
- // Disable only this grid, not sub-grids
462
+ // Disable only this grid, not sub-grids
462
463
  grid.disable(false);
463
464
  ```
464
465
 
@@ -468,15 +469,15 @@ grid.disable(false);
468
469
  enable(recurse): GridStack;
469
470
  ```
470
471
 
471
- Defined in: [gridstack.ts:2313](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L2313)
472
+ Defined in: [gridstack.ts:2316](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L2316)
472
473
 
473
- Re-enables widgets moving/resizing - see disable().
474
+ Re-enables widgets moving/resizing - see disable().
474
475
  Note: This is a no-op for static grids.
475
476
 
476
- This is a shortcut for:
477
- ```typescript
478
- grid.enableMove(true);
479
- grid.enableResize(true);
477
+ This is a shortcut for:
478
+ ```typescript
479
+ grid.enableMove(true);
480
+ grid.enableResize(true);
480
481
  ```
481
482
 
482
483
  ###### Parameters
@@ -494,10 +495,10 @@ the grid instance for chaining
494
495
  ###### Example
495
496
 
496
497
  ```ts
497
- // Re-enable all interactions
498
+ // Re-enable all interactions
498
499
  grid.enable();
499
500
 
500
- // Enable only this grid, not sub-grids
501
+ // Enable only this grid, not sub-grids
501
502
  grid.enable(false);
502
503
  ```
503
504
 
@@ -507,9 +508,9 @@ grid.enable(false);
507
508
  enableMove(doEnable, recurse): GridStack;
508
509
  ```
509
510
 
510
- Defined in: [gridstack.ts:2339](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L2339)
511
+ Defined in: [gridstack.ts:2342](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L2342)
511
512
 
512
- Enables/disables widget moving for all widgets. No-op for static grids.
513
+ Enables/disables widget moving for all widgets. No-op for static grids.
513
514
  Note: locally defined items (with noMove property) still override this setting.
514
515
 
515
516
  ###### Parameters
@@ -528,13 +529,13 @@ the grid instance for chaining
528
529
  ###### Example
529
530
 
530
531
  ```ts
531
- // Enable moving for all widgets
532
+ // Enable moving for all widgets
532
533
  grid.enableMove(true);
533
534
 
534
- // Disable moving for all widgets
535
+ // Disable moving for all widgets
535
536
  grid.enableMove(false);
536
537
 
537
- // Enable only this grid, not sub-grids
538
+ // Enable only this grid, not sub-grids
538
539
  grid.enableMove(true, false);
539
540
  ```
540
541
 
@@ -544,9 +545,9 @@ grid.enableMove(true, false);
544
545
  enableResize(doEnable, recurse): GridStack;
545
546
  ```
546
547
 
547
- Defined in: [gridstack.ts:2367](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L2367)
548
+ Defined in: [gridstack.ts:2370](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L2370)
548
549
 
549
- Enables/disables widget resizing for all widgets. No-op for static grids.
550
+ Enables/disables widget resizing for all widgets. No-op for static grids.
550
551
  Note: locally defined items (with noResize property) still override this setting.
551
552
 
552
553
  ###### Parameters
@@ -565,13 +566,13 @@ the grid instance for chaining
565
566
  ###### Example
566
567
 
567
568
  ```ts
568
- // Enable resizing for all widgets
569
+ // Enable resizing for all widgets
569
570
  grid.enableResize(true);
570
571
 
571
- // Disable resizing for all widgets
572
+ // Disable resizing for all widgets
572
573
  grid.enableResize(false);
573
574
 
574
- // Enable only this grid, not sub-grids
575
+ // Enable only this grid, not sub-grids
575
576
  grid.enableResize(true, false);
576
577
  ```
577
578
 
@@ -583,7 +584,7 @@ float(val): GridStack;
583
584
 
584
585
  Defined in: [gridstack.ts:1149](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L1149)
585
586
 
586
- Enable/disable floating widgets (default: `false`). When enabled, widgets can float up to fill empty spaces.
587
+ Enable/disable floating widgets (default: `false`). When enabled, widgets can float up to fill empty spaces.
587
588
  See [example](http://gridstackjs.com/demo/float.html)
588
589
 
589
590
  ###### Parameters
@@ -601,7 +602,7 @@ the grid instance for chaining
601
602
  ###### Example
602
603
 
603
604
  ```ts
604
- grid.float(true); // Enable floating
605
+ grid.float(true); // Enable floating
605
606
  grid.float(false); // Disable floating (default)
606
607
  ```
607
608
 
@@ -651,10 +652,10 @@ the cell height in pixels
651
652
  ###### Example
652
653
 
653
654
  ```ts
654
- const height = grid.getCellHeight();
655
+ const height = grid.getCellHeight();
655
656
  console.log('Cell height:', height, 'px');
656
657
 
657
- // Force pixel conversion
658
+ // Force pixel conversion
658
659
  const pixelHeight = grid.getCellHeight(true);
659
660
  ```
660
661
 
@@ -686,9 +687,9 @@ const columnCount = grid.getColumn(); // returns 12 by default
686
687
  static getDD(): DDGridStack;
687
688
  ```
688
689
 
689
- Defined in: [gridstack.ts:2183](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L2183)
690
+ Defined in: [gridstack.ts:2186](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L2186)
690
691
 
691
- Get the global drag & drop implementation instance.
692
+ Get the global drag & drop implementation instance.
692
693
  This provides access to the underlying drag & drop functionality.
693
694
 
694
695
  ###### Returns
@@ -700,7 +701,7 @@ the DDGridStack instance used for drag & drop operations
700
701
  ###### Example
701
702
 
702
703
  ```ts
703
- const dd = GridStack.getDD();
704
+ const dd = GridStack.getDD();
704
705
  // Access drag & drop functionality
705
706
  ```
706
707
 
@@ -723,7 +724,7 @@ true if floating is enabled, false otherwise
723
724
  ###### Example
724
725
 
725
726
  ```ts
726
- const isFloating = grid.getFloat();
727
+ const isFloating = grid.getFloat();
727
728
  console.log('Floating enabled:', isFloating);
728
729
  ```
729
730
 
@@ -735,7 +736,7 @@ getGridItems(): GridItemHTMLElement[];
735
736
 
736
737
  Defined in: [gridstack.ts:1092](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L1092)
737
738
 
738
- Returns an array of grid HTML elements (no placeholder) - used to iterate through our children in DOM order.
739
+ Returns an array of grid HTML elements (no placeholder) - used to iterate through our children in DOM order.
739
740
  This method excludes placeholder elements and returns only actual grid items.
740
741
 
741
742
  ###### Returns
@@ -747,9 +748,9 @@ array of GridItemHTMLElement instances representing all grid items
747
748
  ###### Example
748
749
 
749
750
  ```ts
750
- const items = grid.getGridItems();
751
- items.forEach(item => {
752
- console.log('Item ID:', item.gridstackNode.id);
751
+ const items = grid.getGridItems();
752
+ items.forEach(item => {
753
+ console.log('Item ID:', item.gridstackNode.id);
753
754
  });
754
755
  ```
755
756
 
@@ -759,9 +760,9 @@ items.forEach(item => {
759
760
  getMargin(): number;
760
761
  ```
761
762
 
762
- Defined in: [gridstack.ts:1791](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L1791)
763
+ Defined in: [gridstack.ts:1793](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L1793)
763
764
 
764
- Returns the current margin value as a number (undefined if the 4 sides don't match).
765
+ Returns the current margin value as a number (undefined if the 4 sides don't match).
765
766
  This only returns a number if all sides have the same margin value.
766
767
 
767
768
  ###### Returns
@@ -773,11 +774,11 @@ the margin value in pixels, or undefined if sides have different values
773
774
  ###### Example
774
775
 
775
776
  ```ts
776
- const margin = grid.getMargin();
777
- if (margin !== undefined) {
778
- console.log('Uniform margin:', margin, 'px');
779
- } else {
780
- console.log('Margins are different on different sides');
777
+ const margin = grid.getMargin();
778
+ if (margin !== undefined) {
779
+ console.log('Uniform margin:', margin, 'px');
780
+ } else {
781
+ console.log('Margins are different on different sides');
781
782
  }
782
783
  ```
783
784
 
@@ -789,7 +790,7 @@ getRow(): number;
789
790
 
790
791
  Defined in: [gridstack.ts:1209](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L1209)
791
792
 
792
- Returns the current number of rows, which will be at least `minRow` if set.
793
+ Returns the current number of rows, which will be at least `minRow` if set.
793
794
  The row count is based on the highest positioned widget in the grid.
794
795
 
795
796
  ###### Returns
@@ -801,7 +802,7 @@ the current number of rows in the grid
801
802
  ###### Example
802
803
 
803
804
  ```ts
804
- const rowCount = grid.getRow();
805
+ const rowCount = grid.getRow();
805
806
  console.log('Grid has', rowCount, 'rows');
806
807
  ```
807
808
 
@@ -811,10 +812,10 @@ console.log('Grid has', rowCount, 'rows');
811
812
  static init(options, elOrString): GridStack;
812
813
  ```
813
814
 
814
- Defined in: [gridstack.ts:91](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L91)
815
+ Defined in: [gridstack.ts:92](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L92)
815
816
 
816
- initializing the HTML element, or selector string, into a grid will return the grid. Calling it again will
817
- simply return the existing instance (ignore any passed options). There is also an initAll() version that support
817
+ initializing the HTML element, or selector string, into a grid will return the grid. Calling it again will
818
+ simply return the existing instance (ignore any passed options). There is also an initAll() version that support
818
819
  multiple grids initialization at once. Or you can use addGrid() to create the entire grid from JSON.
819
820
 
820
821
  ###### Parameters
@@ -833,7 +834,7 @@ multiple grids initialization at once. Or you can use addGrid() to create the en
833
834
  ```ts
834
835
  const grid = GridStack.init();
835
836
 
836
- Note: the HTMLElement (of type GridHTMLElement) will store a `gridstack: GridStack` value that can be retrieve later
837
+ Note: the HTMLElement (of type GridHTMLElement) will store a `gridstack: GridStack` value that can be retrieve later
837
838
  const grid = document.querySelector('.grid-stack').gridstack;
838
839
  ```
839
840
 
@@ -843,7 +844,7 @@ const grid = document.querySelector('.grid-stack').gridstack;
843
844
  static initAll(options, selector): GridStack[];
844
845
  ```
845
846
 
846
- Defined in: [gridstack.ts:118](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L118)
847
+ Defined in: [gridstack.ts:119](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L119)
847
848
 
848
849
  Will initialize a list of elements (given a selector) and return an array of grids.
849
850
 
@@ -861,7 +862,7 @@ Will initialize a list of elements (given a selector) and return an array of gri
861
862
  ###### Example
862
863
 
863
864
  ```ts
864
- const grids = GridStack.initAll();
865
+ const grids = GridStack.initAll();
865
866
  grids.forEach(...)
866
867
  ```
867
868
 
@@ -897,9 +898,9 @@ true if the area is completely empty, false if any widget overlaps
897
898
  ###### Example
898
899
 
899
900
  ```ts
900
- // Check if a 2x2 area at position (1,1) is empty
901
- if (grid.isAreaEmpty(1, 1, 2, 2)) {
902
- console.log('Area is available for placement');
901
+ // Check if a 2x2 area at position (1,1) is empty
902
+ if (grid.isAreaEmpty(1, 1, 2, 2)) {
903
+ console.log('Area is available for placement');
903
904
  }
904
905
  ```
905
906
 
@@ -911,7 +912,7 @@ isIgnoreChangeCB(): boolean;
911
912
 
912
913
  Defined in: [gridstack.ts:1109](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L1109)
913
914
 
914
- Returns true if change callbacks should be ignored due to column change, sizeToContent, loading, etc.
915
+ Returns true if change callbacks should be ignored due to column change, sizeToContent, loading, etc.
915
916
  This is useful for callers who want to implement dirty flag functionality.
916
917
 
917
918
  ###### Returns
@@ -923,9 +924,9 @@ true if change callbacks are currently being ignored
923
924
  ###### Example
924
925
 
925
926
  ```ts
926
- if (!grid.isIgnoreChangeCB()) {
927
- // Process the change event
928
- console.log('Grid layout changed');
927
+ if (!grid.isIgnoreChangeCB()) {
928
+ // Process the change event
929
+ console.log('Grid layout changed');
929
930
  }
930
931
  ```
931
932
 
@@ -937,7 +938,7 @@ load(items, addRemove): GridStack;
937
938
 
938
939
  Defined in: [gridstack.ts:722](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L722)
939
940
 
940
- Load widgets from a list. This will call update() on each (matching by id) or add/remove widgets that are not there.
941
+ Load widgets from a list. This will call update() on each (matching by id) or add/remove widgets that are not there.
941
942
  Used to restore a grid layout for a saved layout list (see `save()`).
942
943
 
943
944
  ###### Parameters
@@ -956,27 +957,27 @@ the grid instance for chaining
956
957
  ###### Example
957
958
 
958
959
  ```ts
959
- // Basic usage with saved layout
960
- const savedLayout = grid.save(); // Save current layout
961
- // ... later restore it
960
+ // Basic usage with saved layout
961
+ const savedLayout = grid.save(); // Save current layout
962
+ // ... later restore it
962
963
  grid.load(savedLayout);
963
964
 
964
- // Load with custom add/remove callback
965
- grid.load(layout, (items, grid, add) => {
966
- if (add) {
967
- // Custom logic for adding new widgets
968
- items.forEach(item => {
969
- const el = document.createElement('div');
970
- el.innerHTML = item.content || '';
971
- grid.addWidget(el, item);
972
- });
973
- } else {
974
- // Custom logic for removing widgets
975
- items.forEach(item => grid.removeWidget(item.el));
976
- }
965
+ // Load with custom add/remove callback
966
+ grid.load(layout, (items, grid, add) => {
967
+ if (add) {
968
+ // Custom logic for adding new widgets
969
+ items.forEach(item => {
970
+ const el = document.createElement('div');
971
+ el.innerHTML = item.content || '';
972
+ grid.addWidget(el, item);
973
+ });
974
+ } else {
975
+ // Custom logic for removing widgets
976
+ items.forEach(item => grid.removeWidget(item.el));
977
+ }
977
978
  });
978
979
 
979
- // Load without adding/removing missing widgets
980
+ // Load without adding/removing missing widgets
980
981
  grid.load(layout, false);
981
982
  ```
982
983
 
@@ -996,7 +997,7 @@ makeSubGrid(
996
997
 
997
998
  Defined in: [gridstack.ts:506](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L506)
998
999
 
999
- Convert an existing gridItem element into a sub-grid with the given (optional) options, else inherit them
1000
+ Convert an existing gridItem element into a sub-grid with the given (optional) options, else inherit them
1000
1001
  from the parent's subGrid options.
1001
1002
 
1002
1003
  ###### Parameters
@@ -1022,8 +1023,8 @@ makeWidget(els, options?): GridItemHTMLElement;
1022
1023
 
1023
1024
  Defined in: [gridstack.ts:1256](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L1256)
1024
1025
 
1025
- If you add elements to your grid by hand (or have some framework creating DOM), you have to tell gridstack afterwards to make them widgets.
1026
- If you want gridstack to add the elements for you, use `addWidget()` instead.
1026
+ If you add elements to your grid by hand (or have some framework creating DOM), you have to tell gridstack afterwards to make them widgets.
1027
+ If you want gridstack to add the elements for you, use `addWidget()` instead.
1027
1028
  Makes the given element a widget and returns it.
1028
1029
 
1029
1030
  ###### Parameters
@@ -1044,16 +1045,16 @@ the converted GridItemHTMLElement
1044
1045
  ```ts
1045
1046
  const grid = GridStack.init();
1046
1047
 
1047
- // Create HTML content manually, possibly looking like:
1048
- // <div id="item-1" gs-x="0" gs-y="0" gs-w="3" gs-h="2"></div>
1048
+ // Create HTML content manually, possibly looking like:
1049
+ // <div id="item-1" gs-x="0" gs-y="0" gs-w="3" gs-h="2"></div>
1049
1050
  grid.el.innerHTML = '<div id="item-1" gs-w="3"></div><div id="item-2"></div>';
1050
1051
 
1051
- // Convert existing elements to widgets
1052
- grid.makeWidget('#item-1'); // Uses gs-* attributes from DOM
1052
+ // Convert existing elements to widgets
1053
+ grid.makeWidget('#item-1'); // Uses gs-* attributes from DOM
1053
1054
  grid.makeWidget('#item-2', {w: 2, h: 1, content: 'Hello World'});
1054
1055
 
1055
- // Or pass DOM element directly
1056
- const element = document.getElementById('item-3');
1056
+ // Or pass DOM element directly
1057
+ const element = document.getElementById('item-3');
1057
1058
  grid.makeWidget(element, {x: 0, y: 1, w: 4, h: 2});
1058
1059
  ```
1059
1060
 
@@ -1063,9 +1064,9 @@ grid.makeWidget(element, {x: 0, y: 1, w: 4, h: 2});
1063
1064
  margin(value): GridStack;
1064
1065
  ```
1065
1066
 
1066
- Defined in: [gridstack.ts:1762](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L1762)
1067
+ Defined in: [gridstack.ts:1764](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L1764)
1067
1068
 
1068
- Updates the margins which will set all 4 sides at once - see `GridStackOptions.margin` for format options.
1069
+ Updates the margins which will set all 4 sides at once - see `GridStackOptions.margin` for format options.
1069
1070
  Supports CSS string format of 1, 2, or 4 values or a single number.
1070
1071
 
1071
1072
  ###### Parameters
@@ -1083,8 +1084,8 @@ the grid instance for chaining
1083
1084
  ###### Example
1084
1085
 
1085
1086
  ```ts
1086
- grid.margin(10); // 10px all sides
1087
- grid.margin('10px 20px'); // 10px top/bottom, 20px left/right
1087
+ grid.margin(10); // 10px all sides
1088
+ grid.margin('10px 20px'); // 10px top/bottom, 20px left/right
1088
1089
  grid.margin('5px 10px 15px 20px'); // Different for each side
1089
1090
  ```
1090
1091
 
@@ -1094,12 +1095,12 @@ grid.margin('5px 10px 15px 20px'); // Different for each side
1094
1095
  movable(els, val): GridStack;
1095
1096
  ```
1096
1097
 
1097
- Defined in: [gridstack.ts:2227](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L2227)
1098
+ Defined in: [gridstack.ts:2230](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L2230)
1098
1099
 
1099
- Enables/Disables dragging by the user for specific grid elements.
1100
+ Enables/Disables dragging by the user for specific grid elements.
1100
1101
  For all items and future items, use enableMove() instead. No-op for static grids.
1101
1102
 
1102
- Note: If you want to prevent an item from moving due to being pushed around by another
1103
+ Note: If you want to prevent an item from moving due to being pushed around by another
1103
1104
  during collision, use the 'locked' property instead.
1104
1105
 
1105
1106
  ###### Parameters
@@ -1118,10 +1119,10 @@ the grid instance for chaining
1118
1119
  ###### Example
1119
1120
 
1120
1121
  ```ts
1121
- // Make specific widgets draggable
1122
+ // Make specific widgets draggable
1122
1123
  grid.movable('.my-widget', true);
1123
1124
 
1124
- // Disable dragging for specific widgets
1125
+ // Disable dragging for specific widgets
1125
1126
  grid.movable('#fixed-widget', false);
1126
1127
  ```
1127
1128
 
@@ -1179,18 +1180,18 @@ Defined in: [gridstack.ts:1315](https://github.com/adumesny/gridstack.js/blob/ma
1179
1180
 
1180
1181
  Register event handler for grid events. You can call this on a single event name, or space separated list.
1181
1182
 
1182
- Supported events:
1183
- - `added`: Called when widgets are being added to a grid
1184
- - `change`: Occurs when widgets change their position/size due to constraints or direct changes
1185
- - `disable`: Called when grid becomes disabled
1186
- - `dragstart`: Called when grid item starts being dragged
1187
- - `drag`: Called while grid item is being dragged (for each new row/column value)
1188
- - `dragstop`: Called after user is done moving the item, with updated DOM attributes
1189
- - `dropped`: Called when an item has been dropped and accepted over a grid
1190
- - `enable`: Called when grid becomes enabled
1191
- - `removed`: Called when items are being removed from the grid
1192
- - `resizestart`: Called before user starts resizing an item
1193
- - `resize`: Called while grid item is being resized (for each new row/column value)
1183
+ Supported events:
1184
+ - `added`: Called when widgets are being added to a grid
1185
+ - `change`: Occurs when widgets change their position/size due to constraints or direct changes
1186
+ - `disable`: Called when grid becomes disabled
1187
+ - `dragstart`: Called when grid item starts being dragged
1188
+ - `drag`: Called while grid item is being dragged (for each new row/column value)
1189
+ - `dragstop`: Called after user is done moving the item, with updated DOM attributes
1190
+ - `dropped`: Called when an item has been dropped and accepted over a grid
1191
+ - `enable`: Called when grid becomes enabled
1192
+ - `removed`: Called when items are being removed from the grid
1193
+ - `resizestart`: Called before user starts resizing an item
1194
+ - `resize`: Called while grid item is being resized (for each new row/column value)
1194
1195
  - `resizestop`: Called after user is done resizing the item, with updated DOM attributes
1195
1196
 
1196
1197
  ###### Parameters
@@ -1209,14 +1210,14 @@ the grid instance for chaining
1209
1210
  ###### Example
1210
1211
 
1211
1212
  ```ts
1212
- // Listen to multiple events at once
1213
- grid.on('added removed change', (event, items) => {
1214
- items.forEach(item => console.log('Item changed:', item));
1213
+ // Listen to multiple events at once
1214
+ grid.on('added removed change', (event, items) => {
1215
+ items.forEach(item => console.log('Item changed:', item));
1215
1216
  });
1216
1217
 
1217
- // Listen to individual events
1218
- grid.on('added', (event, items) => {
1219
- items.forEach(item => console.log('Added item:', item));
1218
+ // Listen to individual events
1219
+ grid.on('added', (event, items) => {
1220
+ items.forEach(item => console.log('Added item:', item));
1220
1221
  });
1221
1222
  ```
1222
1223
 
@@ -1230,18 +1231,18 @@ Defined in: [gridstack.ts:1316](https://github.com/adumesny/gridstack.js/blob/ma
1230
1231
 
1231
1232
  Register event handler for grid events. You can call this on a single event name, or space separated list.
1232
1233
 
1233
- Supported events:
1234
- - `added`: Called when widgets are being added to a grid
1235
- - `change`: Occurs when widgets change their position/size due to constraints or direct changes
1236
- - `disable`: Called when grid becomes disabled
1237
- - `dragstart`: Called when grid item starts being dragged
1238
- - `drag`: Called while grid item is being dragged (for each new row/column value)
1239
- - `dragstop`: Called after user is done moving the item, with updated DOM attributes
1240
- - `dropped`: Called when an item has been dropped and accepted over a grid
1241
- - `enable`: Called when grid becomes enabled
1242
- - `removed`: Called when items are being removed from the grid
1243
- - `resizestart`: Called before user starts resizing an item
1244
- - `resize`: Called while grid item is being resized (for each new row/column value)
1234
+ Supported events:
1235
+ - `added`: Called when widgets are being added to a grid
1236
+ - `change`: Occurs when widgets change their position/size due to constraints or direct changes
1237
+ - `disable`: Called when grid becomes disabled
1238
+ - `dragstart`: Called when grid item starts being dragged
1239
+ - `drag`: Called while grid item is being dragged (for each new row/column value)
1240
+ - `dragstop`: Called after user is done moving the item, with updated DOM attributes
1241
+ - `dropped`: Called when an item has been dropped and accepted over a grid
1242
+ - `enable`: Called when grid becomes enabled
1243
+ - `removed`: Called when items are being removed from the grid
1244
+ - `resizestart`: Called before user starts resizing an item
1245
+ - `resize`: Called while grid item is being resized (for each new row/column value)
1245
1246
  - `resizestop`: Called after user is done resizing the item, with updated DOM attributes
1246
1247
 
1247
1248
  ###### Parameters
@@ -1260,14 +1261,14 @@ the grid instance for chaining
1260
1261
  ###### Example
1261
1262
 
1262
1263
  ```ts
1263
- // Listen to multiple events at once
1264
- grid.on('added removed change', (event, items) => {
1265
- items.forEach(item => console.log('Item changed:', item));
1264
+ // Listen to multiple events at once
1265
+ grid.on('added removed change', (event, items) => {
1266
+ items.forEach(item => console.log('Item changed:', item));
1266
1267
  });
1267
1268
 
1268
- // Listen to individual events
1269
- grid.on('added', (event, items) => {
1270
- items.forEach(item => console.log('Added item:', item));
1269
+ // Listen to individual events
1270
+ grid.on('added', (event, items) => {
1271
+ items.forEach(item => console.log('Added item:', item));
1271
1272
  });
1272
1273
  ```
1273
1274
 
@@ -1281,18 +1282,18 @@ Defined in: [gridstack.ts:1317](https://github.com/adumesny/gridstack.js/blob/ma
1281
1282
 
1282
1283
  Register event handler for grid events. You can call this on a single event name, or space separated list.
1283
1284
 
1284
- Supported events:
1285
- - `added`: Called when widgets are being added to a grid
1286
- - `change`: Occurs when widgets change their position/size due to constraints or direct changes
1287
- - `disable`: Called when grid becomes disabled
1288
- - `dragstart`: Called when grid item starts being dragged
1289
- - `drag`: Called while grid item is being dragged (for each new row/column value)
1290
- - `dragstop`: Called after user is done moving the item, with updated DOM attributes
1291
- - `dropped`: Called when an item has been dropped and accepted over a grid
1292
- - `enable`: Called when grid becomes enabled
1293
- - `removed`: Called when items are being removed from the grid
1294
- - `resizestart`: Called before user starts resizing an item
1295
- - `resize`: Called while grid item is being resized (for each new row/column value)
1285
+ Supported events:
1286
+ - `added`: Called when widgets are being added to a grid
1287
+ - `change`: Occurs when widgets change their position/size due to constraints or direct changes
1288
+ - `disable`: Called when grid becomes disabled
1289
+ - `dragstart`: Called when grid item starts being dragged
1290
+ - `drag`: Called while grid item is being dragged (for each new row/column value)
1291
+ - `dragstop`: Called after user is done moving the item, with updated DOM attributes
1292
+ - `dropped`: Called when an item has been dropped and accepted over a grid
1293
+ - `enable`: Called when grid becomes enabled
1294
+ - `removed`: Called when items are being removed from the grid
1295
+ - `resizestart`: Called before user starts resizing an item
1296
+ - `resize`: Called while grid item is being resized (for each new row/column value)
1296
1297
  - `resizestop`: Called after user is done resizing the item, with updated DOM attributes
1297
1298
 
1298
1299
  ###### Parameters
@@ -1311,14 +1312,14 @@ the grid instance for chaining
1311
1312
  ###### Example
1312
1313
 
1313
1314
  ```ts
1314
- // Listen to multiple events at once
1315
- grid.on('added removed change', (event, items) => {
1316
- items.forEach(item => console.log('Item changed:', item));
1315
+ // Listen to multiple events at once
1316
+ grid.on('added removed change', (event, items) => {
1317
+ items.forEach(item => console.log('Item changed:', item));
1317
1318
  });
1318
1319
 
1319
- // Listen to individual events
1320
- grid.on('added', (event, items) => {
1321
- items.forEach(item => console.log('Added item:', item));
1320
+ // Listen to individual events
1321
+ grid.on('added', (event, items) => {
1322
+ items.forEach(item => console.log('Added item:', item));
1322
1323
  });
1323
1324
  ```
1324
1325
 
@@ -1332,18 +1333,18 @@ Defined in: [gridstack.ts:1318](https://github.com/adumesny/gridstack.js/blob/ma
1332
1333
 
1333
1334
  Register event handler for grid events. You can call this on a single event name, or space separated list.
1334
1335
 
1335
- Supported events:
1336
- - `added`: Called when widgets are being added to a grid
1337
- - `change`: Occurs when widgets change their position/size due to constraints or direct changes
1338
- - `disable`: Called when grid becomes disabled
1339
- - `dragstart`: Called when grid item starts being dragged
1340
- - `drag`: Called while grid item is being dragged (for each new row/column value)
1341
- - `dragstop`: Called after user is done moving the item, with updated DOM attributes
1342
- - `dropped`: Called when an item has been dropped and accepted over a grid
1343
- - `enable`: Called when grid becomes enabled
1344
- - `removed`: Called when items are being removed from the grid
1345
- - `resizestart`: Called before user starts resizing an item
1346
- - `resize`: Called while grid item is being resized (for each new row/column value)
1336
+ Supported events:
1337
+ - `added`: Called when widgets are being added to a grid
1338
+ - `change`: Occurs when widgets change their position/size due to constraints or direct changes
1339
+ - `disable`: Called when grid becomes disabled
1340
+ - `dragstart`: Called when grid item starts being dragged
1341
+ - `drag`: Called while grid item is being dragged (for each new row/column value)
1342
+ - `dragstop`: Called after user is done moving the item, with updated DOM attributes
1343
+ - `dropped`: Called when an item has been dropped and accepted over a grid
1344
+ - `enable`: Called when grid becomes enabled
1345
+ - `removed`: Called when items are being removed from the grid
1346
+ - `resizestart`: Called before user starts resizing an item
1347
+ - `resize`: Called while grid item is being resized (for each new row/column value)
1347
1348
  - `resizestop`: Called after user is done resizing the item, with updated DOM attributes
1348
1349
 
1349
1350
  ###### Parameters
@@ -1362,14 +1363,14 @@ the grid instance for chaining
1362
1363
  ###### Example
1363
1364
 
1364
1365
  ```ts
1365
- // Listen to multiple events at once
1366
- grid.on('added removed change', (event, items) => {
1367
- items.forEach(item => console.log('Item changed:', item));
1366
+ // Listen to multiple events at once
1367
+ grid.on('added removed change', (event, items) => {
1368
+ items.forEach(item => console.log('Item changed:', item));
1368
1369
  });
1369
1370
 
1370
- // Listen to individual events
1371
- grid.on('added', (event, items) => {
1372
- items.forEach(item => console.log('Added item:', item));
1371
+ // Listen to individual events
1372
+ grid.on('added', (event, items) => {
1373
+ items.forEach(item => console.log('Added item:', item));
1373
1374
  });
1374
1375
  ```
1375
1376
 
@@ -1383,18 +1384,18 @@ Defined in: [gridstack.ts:1319](https://github.com/adumesny/gridstack.js/blob/ma
1383
1384
 
1384
1385
  Register event handler for grid events. You can call this on a single event name, or space separated list.
1385
1386
 
1386
- Supported events:
1387
- - `added`: Called when widgets are being added to a grid
1388
- - `change`: Occurs when widgets change their position/size due to constraints or direct changes
1389
- - `disable`: Called when grid becomes disabled
1390
- - `dragstart`: Called when grid item starts being dragged
1391
- - `drag`: Called while grid item is being dragged (for each new row/column value)
1392
- - `dragstop`: Called after user is done moving the item, with updated DOM attributes
1393
- - `dropped`: Called when an item has been dropped and accepted over a grid
1394
- - `enable`: Called when grid becomes enabled
1395
- - `removed`: Called when items are being removed from the grid
1396
- - `resizestart`: Called before user starts resizing an item
1397
- - `resize`: Called while grid item is being resized (for each new row/column value)
1387
+ Supported events:
1388
+ - `added`: Called when widgets are being added to a grid
1389
+ - `change`: Occurs when widgets change their position/size due to constraints or direct changes
1390
+ - `disable`: Called when grid becomes disabled
1391
+ - `dragstart`: Called when grid item starts being dragged
1392
+ - `drag`: Called while grid item is being dragged (for each new row/column value)
1393
+ - `dragstop`: Called after user is done moving the item, with updated DOM attributes
1394
+ - `dropped`: Called when an item has been dropped and accepted over a grid
1395
+ - `enable`: Called when grid becomes enabled
1396
+ - `removed`: Called when items are being removed from the grid
1397
+ - `resizestart`: Called before user starts resizing an item
1398
+ - `resize`: Called while grid item is being resized (for each new row/column value)
1398
1399
  - `resizestop`: Called after user is done resizing the item, with updated DOM attributes
1399
1400
 
1400
1401
  ###### Parameters
@@ -1413,14 +1414,14 @@ the grid instance for chaining
1413
1414
  ###### Example
1414
1415
 
1415
1416
  ```ts
1416
- // Listen to multiple events at once
1417
- grid.on('added removed change', (event, items) => {
1418
- items.forEach(item => console.log('Item changed:', item));
1417
+ // Listen to multiple events at once
1418
+ grid.on('added removed change', (event, items) => {
1419
+ items.forEach(item => console.log('Item changed:', item));
1419
1420
  });
1420
1421
 
1421
- // Listen to individual events
1422
- grid.on('added', (event, items) => {
1423
- items.forEach(item => console.log('Added item:', item));
1422
+ // Listen to individual events
1423
+ grid.on('added', (event, items) => {
1424
+ items.forEach(item => console.log('Added item:', item));
1424
1425
  });
1425
1426
  ```
1426
1427
 
@@ -1430,10 +1431,10 @@ grid.on('added', (event, items) => {
1430
1431
  onResize(clientWidth): GridStack;
1431
1432
  ```
1432
1433
 
1433
- Defined in: [gridstack.ts:2024](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L2024)
1434
+ Defined in: [gridstack.ts:2027](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L2027)
1434
1435
 
1435
- called when we are being resized - check if the one Column Mode needs to be turned on/off
1436
- and remember the prev columns we used, or get our count from parent, as well as check for cellHeight==='auto' (square)
1436
+ called when we are being resized - check if the one Column Mode needs to be turned on/off
1437
+ and remember the prev columns we used, or get our count from parent, as well as check for cellHeight==='auto' (square)
1437
1438
  or `sizeToContent` gridItem options.
1438
1439
 
1439
1440
  ###### Parameters
@@ -1452,7 +1453,7 @@ or `sizeToContent` gridItem options.
1452
1453
  prepareDragDrop(el, force?): GridStack;
1453
1454
  ```
1454
1455
 
1455
- Defined in: [gridstack.ts:2710](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L2710)
1456
+ Defined in: [gridstack.ts:2713](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L2713)
1456
1457
 
1457
1458
  prepares the element for drag&drop - this is normally called by makeWidget() unless are are delay loading
1458
1459
 
@@ -1473,10 +1474,10 @@ prepares the element for drag&drop - this is normally called by makeWidget() unl
1473
1474
  static registerEngine(engineClass): void;
1474
1475
  ```
1475
1476
 
1476
- Defined in: [gridstack.ts:172](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L172)
1477
+ Defined in: [gridstack.ts:173](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L173)
1477
1478
 
1478
- call this method to register your engine instead of the default one.
1479
- See instead `GridStackOptions.engineClass` if you only need to
1479
+ call this method to register your engine instead of the default one.
1480
+ See instead `GridStackOptions.engineClass` if you only need to
1480
1481
  replace just one instance.
1481
1482
 
1482
1483
  ###### Parameters
@@ -1518,7 +1519,7 @@ removeAsSubGrid(nodeThatRemoved?): void;
1518
1519
 
1519
1520
  Defined in: [gridstack.ts:599](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L599)
1520
1521
 
1521
- called when an item was converted into a nested grid to accommodate a dragged over item, but then item leaves - return back
1522
+ called when an item was converted into a nested grid to accommodate a dragged over item, but then item leaves - return back
1522
1523
  to the original grid-item. Also called to remove empty sub-grids when last item is dragged out (since re-creating is simple)
1523
1524
 
1524
1525
  ###### Parameters
@@ -1562,9 +1563,9 @@ Removes widget from the grid.
1562
1563
  resizable(els, val): GridStack;
1563
1564
  ```
1564
1565
 
1565
- Defined in: [gridstack.ts:2253](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L2253)
1566
+ Defined in: [gridstack.ts:2256](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L2256)
1566
1567
 
1567
- Enables/Disables user resizing for specific grid elements.
1568
+ Enables/Disables user resizing for specific grid elements.
1568
1569
  For all items and future items, use enableResize() instead. No-op for static grids.
1569
1570
 
1570
1571
  ###### Parameters
@@ -1583,10 +1584,10 @@ the grid instance for chaining
1583
1584
  ###### Example
1584
1585
 
1585
1586
  ```ts
1586
- // Make specific widgets resizable
1587
+ // Make specific widgets resizable
1587
1588
  grid.resizable('.my-widget', true);
1588
1589
 
1589
- // Disable resizing for specific widgets
1590
+ // Disable resizing for specific widgets
1590
1591
  grid.resizable('#fixed-size-widget', false);
1591
1592
  ```
1592
1593
 
@@ -1596,12 +1597,12 @@ grid.resizable('#fixed-size-widget', false);
1596
1597
  resizeToContent(el): void;
1597
1598
  ```
1598
1599
 
1599
- Defined in: [gridstack.ts:1652](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L1652)
1600
+ Defined in: [gridstack.ts:1654](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L1654)
1600
1601
 
1601
- Updates widget height to match the content height to avoid vertical scrollbars or dead space.
1602
+ Updates widget height to match the content height to avoid vertical scrollbars or dead space.
1602
1603
  This automatically adjusts the widget height based on its content size.
1603
1604
 
1604
- Note: This assumes only 1 child under resizeToContentParent='.grid-stack-item-content'
1605
+ Note: This assumes only 1 child under resizeToContentParent='.grid-stack-item-content'
1605
1606
  (sized to gridItem minus padding) that represents the entire content size.
1606
1607
 
1607
1608
  ###### Parameters
@@ -1617,12 +1618,12 @@ Note: This assumes only 1 child under resizeToContentParent='.grid-stack-item-co
1617
1618
  ###### Example
1618
1619
 
1619
1620
  ```ts
1620
- // Resize a widget to fit its content
1621
- const widget = document.querySelector('.grid-stack-item');
1621
+ // Resize a widget to fit its content
1622
+ const widget = document.querySelector('.grid-stack-item');
1622
1623
  grid.resizeToContent(widget);
1623
1624
 
1624
- // This is commonly used with dynamic content:
1625
- widget.querySelector('.content').innerHTML = 'New longer content...';
1625
+ // This is commonly used with dynamic content:
1626
+ widget.querySelector('.content').innerHTML = 'New longer content...';
1626
1627
  grid.resizeToContent(widget);
1627
1628
  ```
1628
1629
 
@@ -1632,9 +1633,9 @@ grid.resizeToContent(widget);
1632
1633
  rotate(els, relative?): GridStack;
1633
1634
  ```
1634
1635
 
1635
- Defined in: [gridstack.ts:1727](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L1727)
1636
+ Defined in: [gridstack.ts:1729](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L1729)
1636
1637
 
1637
- Rotate widgets by swapping their width and height. This is typically called when the user presses 'r' during dragging.
1638
+ Rotate widgets by swapping their width and height. This is typically called when the user presses 'r' during dragging.
1638
1639
  The rotation swaps the w/h dimensions and adjusts min/max constraints accordingly.
1639
1640
 
1640
1641
  ###### Parameters
@@ -1653,10 +1654,10 @@ the grid instance for chaining
1653
1654
  ###### Example
1654
1655
 
1655
1656
  ```ts
1656
- // Rotate a specific widget
1657
+ // Rotate a specific widget
1657
1658
  grid.rotate('.my-widget');
1658
1659
 
1659
- // Rotate with relative positioning during drag
1660
+ // Rotate with relative positioning during drag
1660
1661
  grid.rotate(widget, { left: 50, top: 30 });
1661
1662
  ```
1662
1663
 
@@ -1724,7 +1725,7 @@ setStatic(
1724
1725
 
1725
1726
  Defined in: [gridstack.ts:1470](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L1470)
1726
1727
 
1727
- Toggle the grid static state, which permanently removes/add Drag&Drop support, unlike disable()/enable() that just turns it off/on.
1728
+ Toggle the grid static state, which permanently removes/add Drag&Drop support, unlike disable()/enable() that just turns it off/on.
1728
1729
  Also toggle the grid-stack-static class.
1729
1730
 
1730
1731
  ###### Parameters
@@ -1749,10 +1750,10 @@ static setupDragIn(
1749
1750
  root?): void;
1750
1751
  ```
1751
1752
 
1752
- Defined in: [gridstack.ts:2196](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L2196)
1753
+ Defined in: [gridstack.ts:2199](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L2199)
1753
1754
 
1754
- call to setup dragging in from the outside (say toolbar), by specifying the class selection and options.
1755
- Called during GridStack.init() as options, but can also be called directly (last param are used) in case the toolbar
1755
+ call to setup dragging in from the outside (say toolbar), by specifying the class selection and options.
1756
+ Called during GridStack.init() as options, but can also be called directly (last param are used) in case the toolbar
1756
1757
  is dynamically create and needs to be set later.
1757
1758
 
1758
1759
  ###### Parameters
@@ -1774,7 +1775,7 @@ is dynamically create and needs to be set later.
1774
1775
  protected triggerEvent(event, target): void;
1775
1776
  ```
1776
1777
 
1777
- Defined in: [gridstack.ts:2964](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L2964)
1778
+ Defined in: [gridstack.ts:2976](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L2976)
1778
1779
 
1779
1780
  call given event callback on our main top-most grid (if we're nested)
1780
1781
 
@@ -1795,12 +1796,12 @@ call given event callback on our main top-most grid (if we're nested)
1795
1796
  update(els, opt): GridStack;
1796
1797
  ```
1797
1798
 
1798
- Defined in: [gridstack.ts:1548](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L1548)
1799
+ Defined in: [gridstack.ts:1550](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L1550)
1799
1800
 
1800
- Updates widget position/size and other info. This is used to change widget properties after creation.
1801
+ Updates widget position/size and other info. This is used to change widget properties after creation.
1801
1802
  Can update position, size, content, and other widget properties.
1802
1803
 
1803
- Note: If you need to call this on all nodes, use load() instead which will update what changed.
1804
+ Note: If you need to call this on all nodes, use load() instead which will update what changed.
1804
1805
  Setting the same x,y for multiple items will be indeterministic and likely unwanted.
1805
1806
 
1806
1807
  ###### Parameters
@@ -1819,18 +1820,18 @@ the grid instance for chaining
1819
1820
  ###### Example
1820
1821
 
1821
1822
  ```ts
1822
- // Update widget size and position
1823
+ // Update widget size and position
1823
1824
  grid.update('.my-widget', { x: 2, y: 1, w: 3, h: 2 });
1824
1825
 
1825
- // Update widget content
1826
+ // Update widget content
1826
1827
  grid.update(widget, { content: '<p>New content</p>' });
1827
1828
 
1828
- // Update multiple properties
1829
- grid.update('#my-widget', {
1830
- w: 4,
1831
- h: 3,
1832
- noResize: true,
1833
- locked: true
1829
+ // Update multiple properties
1830
+ grid.update('#my-widget', {
1831
+ w: 4,
1832
+ h: 3,
1833
+ noResize: true,
1834
+ locked: true
1834
1835
  });
1835
1836
  ```
1836
1837
 
@@ -1860,9 +1861,9 @@ Updates the passed in options on the grid (similar to update(widget) for for the
1860
1861
  willItFit(node): boolean;
1861
1862
  ```
1862
1863
 
1863
- Defined in: [gridstack.ts:1805](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L1805)
1864
+ Defined in: [gridstack.ts:1807](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L1807)
1864
1865
 
1865
- Returns true if the height of the grid will be less than the vertical
1866
+ Returns true if the height of the grid will be less than the vertical
1866
1867
  constraint. Always returns true if grid doesn't have height constraint.
1867
1868
 
1868
1869
  ###### Parameters
@@ -1878,10 +1879,10 @@ constraint. Always returns true if grid doesn't have height constraint.
1878
1879
  ###### Example
1879
1880
 
1880
1881
  ```ts
1881
- if (grid.willItFit(newWidget)) {
1882
- grid.addWidget(newWidget);
1883
- } else {
1884
- alert('Not enough free space to place the widget');
1882
+ if (grid.willItFit(newWidget)) {
1883
+ grid.addWidget(newWidget);
1884
+ } else {
1885
+ alert('Not enough free space to place the widget');
1885
1886
  }
1886
1887
  ```
1887
1888
 
@@ -1889,22 +1890,22 @@ if (grid.willItFit(newWidget)) {
1889
1890
 
1890
1891
  | Property | Modifier | Type | Default value | Description | Defined in |
1891
1892
  | ------ | ------ | ------ | ------ | ------ | ------ |
1892
- | <a id="addremovecb"></a> `addRemoveCB?` | `static` | [`AddRemoveFcn`](#addremovefcn) | `undefined` | callback method use when new items|grids needs to be created or deleted, instead of the default item: <div class="grid-stack-item"><div class="grid-stack-item-content">w.content</div></div> grid: <div class="grid-stack">grid content...</div> add = true: the returned DOM element will then be converted to a GridItemHTMLElement using makeWidget()|GridStack:init(). add = false: the item will be removed from DOM (if not already done) grid = true|false for grid vs grid-items | [gridstack.ts:184](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L184) |
1893
- | <a id="animationdelay"></a> `animationDelay` | `public` | `number` | `undefined` | time to wait for animation (if enabled) to be done so content sizing can happen | [gridstack.ts:218](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L218) |
1893
+ | <a id="addremovecb"></a> `addRemoveCB?` | `static` | [`AddRemoveFcn`](#addremovefcn) | `undefined` | callback method use when new items|grids needs to be created or deleted, instead of the default item: <div class="grid-stack-item"><div class="grid-stack-item-content">w.content</div></div> grid: <div class="grid-stack">grid content...</div> add = true: the returned DOM element will then be converted to a GridItemHTMLElement using makeWidget()|GridStack:init(). add = false: the item will be removed from DOM (if not already done) grid = true|false for grid vs grid-items | [gridstack.ts:185](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L185) |
1894
+ | <a id="animationdelay"></a> `animationDelay` | `public` | `number` | `undefined` | time to wait for animation (if enabled) to be done so content sizing can happen | [gridstack.ts:219](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L219) |
1894
1895
  | <a id="el-4"></a> `el` | `public` | [`GridHTMLElement`](#gridhtmlelement) | `undefined` | the HTML element tied to this grid after it's been initialized | [gridstack.ts:266](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L266) |
1895
- | <a id="engine"></a> `engine` | `public` | [`GridStackEngine`](#gridstackengine-2) | `undefined` | engine used to implement non DOM grid functionality | [gridstack.ts:212](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L212) |
1896
- | <a id="engine-1"></a> `Engine` | `static` | *typeof* [`GridStackEngine`](#gridstackengine-2) | `GridStackEngine` | scoping so users can call new GridStack.Engine(12) for example | [gridstack.ts:209](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L209) |
1897
- | <a id="engineclass"></a> `engineClass` | `static` | *typeof* [`GridStackEngine`](#gridstackengine-2) | `undefined` | - | [gridstack.ts:220](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L220) |
1896
+ | <a id="engine"></a> `engine` | `public` | [`GridStackEngine`](#gridstackengine-2) | `undefined` | engine used to implement non DOM grid functionality | [gridstack.ts:213](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L213) |
1897
+ | <a id="engine-1"></a> `Engine` | `static` | *typeof* [`GridStackEngine`](#gridstackengine-2) | `GridStackEngine` | scoping so users can call new GridStack.Engine(12) for example | [gridstack.ts:210](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L210) |
1898
+ | <a id="engineclass"></a> `engineClass` | `static` | *typeof* [`GridStackEngine`](#gridstackengine-2) | `undefined` | - | [gridstack.ts:221](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L221) |
1898
1899
  | <a id="opts"></a> `opts` | `public` | [`GridStackOptions`](#gridstackoptions) | `{}` | grid options - public for classes to access, but use methods to modify! | [gridstack.ts:266](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L266) |
1899
- | <a id="parentgridnode"></a> `parentGridNode?` | `public` | [`GridStackNode`](#gridstacknode-2) | `undefined` | point to a parent grid item if we're nested (inside a grid-item in between 2 Grids) | [gridstack.ts:215](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L215) |
1900
- | <a id="rendercb"></a> `renderCB?` | `static` | [`RenderFcn`](#renderfcn) | `undefined` | callback to create the content of widgets so the app can control how to store and restore it By default this lib will do 'el.textContent = w.content' forcing text only support for avoiding potential XSS issues. | [gridstack.ts:195](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L195) |
1901
- | <a id="resizeobserver"></a> `resizeObserver` | `protected` | `ResizeObserver` | `undefined` | - | [gridstack.ts:221](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L221) |
1902
- | <a id="resizetocontentcb"></a> `resizeToContentCB?` | `static` | [`ResizeToContentFcn`](#resizetocontentfcn) | `undefined` | callback to use for resizeToContent instead of the built in one | [gridstack.ts:201](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L201) |
1903
- | <a id="resizetocontentparent"></a> `resizeToContentParent` | `static` | `string` | `'.grid-stack-item-content'` | parent class for sizing content. defaults to '.grid-stack-item-content' | [gridstack.ts:203](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L203) |
1904
- | <a id="responselayout"></a> `responseLayout` | `protected` | [`ColumnOptions`](#columnoptions) | `undefined` | - | [gridstack.ts:258](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L258) |
1905
- | <a id="savecb"></a> `saveCB?` | `static` | [`SaveFcn`](#savefcn) | `undefined` | callback during saving to application can inject extra data for each widget, on top of the grid layout properties | [gridstack.ts:189](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L189) |
1906
- | <a id="updatecb"></a> `updateCB?` | `static` | (`w`) => `void` | `undefined` | called after a widget has been updated (eg: load() into an existing list of children) so application can do extra work | [gridstack.ts:198](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L198) |
1907
- | <a id="utils"></a> `Utils` | `static` | *typeof* [`Utils`](#utils-1) | `Utils` | scoping so users can call GridStack.Utils.sort() for example | [gridstack.ts:206](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L206) |
1900
+ | <a id="parentgridnode"></a> `parentGridNode?` | `public` | [`GridStackNode`](#gridstacknode-2) | `undefined` | point to a parent grid item if we're nested (inside a grid-item in between 2 Grids) | [gridstack.ts:216](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L216) |
1901
+ | <a id="rendercb"></a> `renderCB?` | `static` | [`RenderFcn`](#renderfcn) | `undefined` | callback to create the content of widgets so the app can control how to store and restore it By default this lib will do 'el.textContent = w.content' forcing text only support for avoiding potential XSS issues. | [gridstack.ts:196](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L196) |
1902
+ | <a id="resizeobserver"></a> `resizeObserver` | `protected` | `ResizeObserver` | `undefined` | - | [gridstack.ts:222](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L222) |
1903
+ | <a id="resizetocontentcb"></a> `resizeToContentCB?` | `static` | [`ResizeToContentFcn`](#resizetocontentfcn) | `undefined` | callback to use for resizeToContent instead of the built in one | [gridstack.ts:202](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L202) |
1904
+ | <a id="resizetocontentparent"></a> `resizeToContentParent` | `static` | `string` | `'.grid-stack-item-content'` | parent class for sizing content. defaults to '.grid-stack-item-content' | [gridstack.ts:204](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L204) |
1905
+ | <a id="responselayout"></a> `responseLayout` | `protected` | [`ColumnOptions`](#columnoptions) | `undefined` | - | [gridstack.ts:259](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L259) |
1906
+ | <a id="savecb"></a> `saveCB?` | `static` | [`SaveFcn`](#savefcn) | `undefined` | callback during saving to application can inject extra data for each widget, on top of the grid layout properties | [gridstack.ts:190](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L190) |
1907
+ | <a id="updatecb"></a> `updateCB?` | `static` | (`w`) => `void` | `undefined` | called after a widget has been updated (eg: load() into an existing list of children) so application can do extra work | [gridstack.ts:199](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L199) |
1908
+ | <a id="utils"></a> `Utils` | `static` | *typeof* [`Utils`](#utils-1) | `Utils` | scoping so users can call GridStack.Utils.sort() for example | [gridstack.ts:207](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L207) |
1908
1909
 
1909
1910
  ***
1910
1911
 
@@ -2809,8 +2810,8 @@ return true if can fit in grid height constrain only (always true if no maxRow)
2809
2810
 
2810
2811
  Defined in: [utils.ts:97](https://github.com/adumesny/gridstack.js/blob/master/src/utils.ts#L97)
2811
2812
 
2812
- Collection of utility methods used throughout GridStack.
2813
- These are general-purpose helper functions for DOM manipulation,
2813
+ Collection of utility methods used throughout GridStack.
2814
+ These are general-purpose helper functions for DOM manipulation,
2814
2815
  positioning calculations, object operations, and more.
2815
2816
 
2816
2817
  #### Constructors
@@ -2833,7 +2834,7 @@ new Utils(): Utils;
2833
2834
  static addElStyles(el, styles): void;
2834
2835
  ```
2835
2836
 
2836
- Defined in: [utils.ts:701](https://github.com/adumesny/gridstack.js/blob/master/src/utils.ts#L701)
2837
+ Defined in: [utils.ts:667](https://github.com/adumesny/gridstack.js/blob/master/src/utils.ts#L667)
2837
2838
 
2838
2839
  ###### Parameters
2839
2840
 
@@ -2852,7 +2853,7 @@ Defined in: [utils.ts:701](https://github.com/adumesny/gridstack.js/blob/master/
2852
2853
  static appendTo(el, parent): void;
2853
2854
  ```
2854
2855
 
2855
- Defined in: [utils.ts:683](https://github.com/adumesny/gridstack.js/blob/master/src/utils.ts#L683)
2856
+ Defined in: [utils.ts:649](https://github.com/adumesny/gridstack.js/blob/master/src/utils.ts#L649)
2856
2857
 
2857
2858
  ###### Parameters
2858
2859
 
@@ -2919,9 +2920,9 @@ the area of overlap (0 if no overlap)
2919
2920
  ###### Example
2920
2921
 
2921
2922
  ```ts
2922
- const overlap = Utils.areaIntercept(
2923
- {x: 0, y: 0, w: 3, h: 2},
2924
- {x: 1, y: 0, w: 3, h: 2}
2923
+ const overlap = Utils.areaIntercept(
2924
+ {x: 0, y: 0, w: 3, h: 2},
2925
+ {x: 1, y: 0, w: 3, h: 2}
2925
2926
  ); // returns 4 (2x2 overlap)
2926
2927
  ```
2927
2928
 
@@ -2931,7 +2932,7 @@ const overlap = Utils.areaIntercept(
2931
2932
  static canBeRotated(n): boolean;
2932
2933
  ```
2933
2934
 
2934
- Defined in: [utils.ts:804](https://github.com/adumesny/gridstack.js/blob/master/src/utils.ts#L804)
2935
+ Defined in: [utils.ts:770](https://github.com/adumesny/gridstack.js/blob/master/src/utils.ts#L770)
2935
2936
 
2936
2937
  true if the item can be rotated (checking for prop, not space available)
2937
2938
 
@@ -2951,7 +2952,7 @@ true if the item can be rotated (checking for prop, not space available)
2951
2952
  static clone<T>(obj): T;
2952
2953
  ```
2953
2954
 
2954
- Defined in: [utils.ts:646](https://github.com/adumesny/gridstack.js/blob/master/src/utils.ts#L646)
2955
+ Defined in: [utils.ts:612](https://github.com/adumesny/gridstack.js/blob/master/src/utils.ts#L612)
2955
2956
 
2956
2957
  single level clone, returning a new object with same top fields. This will share sub objects and arrays
2957
2958
 
@@ -2977,9 +2978,9 @@ single level clone, returning a new object with same top fields. This will share
2977
2978
  static cloneDeep<T>(obj): T;
2978
2979
  ```
2979
2980
 
2980
- Defined in: [utils.ts:662](https://github.com/adumesny/gridstack.js/blob/master/src/utils.ts#L662)
2981
+ Defined in: [utils.ts:628](https://github.com/adumesny/gridstack.js/blob/master/src/utils.ts#L628)
2981
2982
 
2982
- Recursive clone version that returns a full copy, checking for nested objects and arrays ONLY.
2983
+ Recursive clone version that returns a full copy, checking for nested objects and arrays ONLY.
2983
2984
  Note: this will use as-is any key starting with double __ (and not copy inside) some lib have circular dependencies.
2984
2985
 
2985
2986
  ###### Type Parameters
@@ -3004,7 +3005,7 @@ Note: this will use as-is any key starting with double __ (and not copy inside)
3004
3005
  static cloneNode(el): HTMLElement;
3005
3006
  ```
3006
3007
 
3007
- Defined in: [utils.ts:677](https://github.com/adumesny/gridstack.js/blob/master/src/utils.ts#L677)
3008
+ Defined in: [utils.ts:643](https://github.com/adumesny/gridstack.js/blob/master/src/utils.ts#L643)
3008
3009
 
3009
3010
  deep clone the given HTML node, removing teh unique id field
3010
3011
 
@@ -3029,7 +3030,7 @@ static copyPos(
3029
3030
 
3030
3031
  Defined in: [utils.ts:474](https://github.com/adumesny/gridstack.js/blob/master/src/utils.ts#L474)
3031
3032
 
3032
- Copy position and size properties from one widget to another.
3033
+ Copy position and size properties from one widget to another.
3033
3034
  Copies x, y, w, h and optionally min/max constraints.
3034
3035
 
3035
3036
  ###### Parameters
@@ -3049,7 +3050,7 @@ the target widget (a)
3049
3050
  ###### Example
3050
3051
 
3051
3052
  ```ts
3052
- Utils.copyPos(widget1, widget2); // Copy position/size
3053
+ Utils.copyPos(widget1, widget2); // Copy position/size
3053
3054
  Utils.copyPos(widget1, widget2, true); // Also copy constraints
3054
3055
  ```
3055
3056
 
@@ -3079,7 +3080,7 @@ the created div element
3079
3080
  ###### Example
3080
3081
 
3081
3082
  ```ts
3082
- const div = Utils.createDiv(['grid-item', 'draggable']);
3083
+ const div = Utils.createDiv(['grid-item', 'draggable']);
3083
3084
  const nested = Utils.createDiv(['content'], parentDiv);
3084
3085
  ```
3085
3086
 
@@ -3091,7 +3092,7 @@ static defaults(target, ...sources): object;
3091
3092
 
3092
3093
  Defined in: [utils.ts:421](https://github.com/adumesny/gridstack.js/blob/master/src/utils.ts#L421)
3093
3094
 
3094
- Copy unset fields from source objects to target object (shallow merge with defaults).
3095
+ Copy unset fields from source objects to target object (shallow merge with defaults).
3095
3096
  Similar to Object.assign but only sets undefined/null fields.
3096
3097
 
3097
3098
  ###### Parameters
@@ -3110,8 +3111,8 @@ the modified target object
3110
3111
  ###### Example
3111
3112
 
3112
3113
  ```ts
3113
- const config = { width: 100 };
3114
- Utils.defaults(config, { width: 200, height: 50 });
3114
+ const config = { width: 100 };
3115
+ Utils.defaults(config, { width: 200, height: 50 });
3115
3116
  // config is now { width: 100, height: 50 }
3116
3117
  ```
3117
3118
 
@@ -3141,7 +3142,7 @@ the node with matching ID, or undefined if not found
3141
3142
  ###### Example
3142
3143
 
3143
3144
  ```ts
3144
- const node = Utils.find(nodes, 'widget-1');
3145
+ const node = Utils.find(nodes, 'widget-1');
3145
3146
  if (node) console.log('Found node at:', node.x, node.y);
3146
3147
  ```
3147
3148
 
@@ -3153,7 +3154,7 @@ static getElement(els, root): HTMLElement;
3153
3154
 
3154
3155
  Defined in: [utils.ts:155](https://github.com/adumesny/gridstack.js/blob/master/src/utils.ts#L155)
3155
3156
 
3156
- Convert a potential selector into a single HTML element.
3157
+ Convert a potential selector into a single HTML element.
3157
3158
  Similar to getElements() but returns only the first match.
3158
3159
 
3159
3160
  ###### Parameters
@@ -3172,7 +3173,7 @@ the first HTML element matching the selector, or null if not found
3172
3173
  ###### Example
3173
3174
 
3174
3175
  ```ts
3175
- const element = Utils.getElement('#myWidget');
3176
+ const element = Utils.getElement('#myWidget');
3176
3177
  const first = Utils.getElement('.grid-item');
3177
3178
  ```
3178
3179
 
@@ -3184,7 +3185,7 @@ static getElements(els, root): HTMLElement[];
3184
3185
 
3185
3186
  Defined in: [utils.ts:112](https://github.com/adumesny/gridstack.js/blob/master/src/utils.ts#L112)
3186
3187
 
3187
- Convert a potential selector into an actual list of HTML elements.
3188
+ Convert a potential selector into an actual list of HTML elements.
3188
3189
  Supports CSS selectors, element references, and special ID handling.
3189
3190
 
3190
3191
  ###### Parameters
@@ -3203,8 +3204,8 @@ array of HTML elements matching the selector
3203
3204
  ###### Example
3204
3205
 
3205
3206
  ```ts
3206
- const elements = Utils.getElements('.grid-item');
3207
- const byId = Utils.getElements('#myWidget');
3207
+ const elements = Utils.getElements('.grid-item');
3208
+ const byId = Utils.getElements('#myWidget');
3208
3209
  const fromShadow = Utils.getElements('.item', shadowRoot);
3209
3210
  ```
3210
3211
 
@@ -3214,9 +3215,9 @@ const fromShadow = Utils.getElements('.item', shadowRoot);
3214
3215
  static getValuesFromTransformedElement(parent): DragTransform;
3215
3216
  ```
3216
3217
 
3217
- Defined in: [utils.ts:761](https://github.com/adumesny/gridstack.js/blob/master/src/utils.ts#L761)
3218
+ Defined in: [utils.ts:727](https://github.com/adumesny/gridstack.js/blob/master/src/utils.ts#L727)
3218
3219
 
3219
- defines an element that is used to get the offset and scale from grid transforms
3220
+ defines an element that is used to get the offset and scale from grid transforms
3220
3221
  returns the scale and offsets from said element
3221
3222
 
3222
3223
  ###### Parameters
@@ -3235,7 +3236,7 @@ returns the scale and offsets from said element
3235
3236
  static initEvent<T>(e, info): T;
3236
3237
  ```
3237
3238
 
3238
- Defined in: [utils.ts:718](https://github.com/adumesny/gridstack.js/blob/master/src/utils.ts#L718)
3239
+ Defined in: [utils.ts:684](https://github.com/adumesny/gridstack.js/blob/master/src/utils.ts#L684)
3239
3240
 
3240
3241
  ###### Type Parameters
3241
3242
 
@@ -3282,9 +3283,9 @@ true if the positions overlap
3282
3283
  ###### Example
3283
3284
 
3284
3285
  ```ts
3285
- const overlaps = Utils.isIntercepted(
3286
- {x: 0, y: 0, w: 2, h: 1},
3287
- {x: 1, y: 0, w: 2, h: 1}
3286
+ const overlaps = Utils.isIntercepted(
3287
+ {x: 0, y: 0, w: 2, h: 1},
3288
+ {x: 1, y: 0, w: 2, h: 1}
3288
3289
  ); // true - they overlap
3289
3290
  ```
3290
3291
 
@@ -3314,9 +3315,9 @@ true if the positions are touching
3314
3315
  ###### Example
3315
3316
 
3316
3317
  ```ts
3317
- const touching = Utils.isTouching(
3318
- {x: 0, y: 0, w: 2, h: 1},
3319
- {x: 2, y: 0, w: 1, h: 1}
3318
+ const touching = Utils.isTouching(
3319
+ {x: 0, y: 0, w: 2, h: 1},
3320
+ {x: 2, y: 0, w: 1, h: 1}
3320
3321
  ); // true - they share an edge
3321
3322
  ```
3322
3323
 
@@ -3345,8 +3346,8 @@ true if the item should be lazy loaded
3345
3346
  ###### Example
3346
3347
 
3347
3348
  ```ts
3348
- if (Utils.lazyLoad(node)) {
3349
- // Set up intersection observer for lazy loading
3349
+ if (Utils.lazyLoad(node)) {
3350
+ // Set up intersection observer for lazy loading
3350
3351
  }
3351
3352
  ```
3352
3353
 
@@ -3358,7 +3359,7 @@ static parseHeight(val): HeightData;
3358
3359
 
3359
3360
  Defined in: [utils.ts:388](https://github.com/adumesny/gridstack.js/blob/master/src/utils.ts#L388)
3360
3361
 
3361
- Parse a height value with units into numeric value and unit string.
3362
+ Parse a height value with units into numeric value and unit string.
3362
3363
  Supports px, em, rem, vh, vw, %, cm, mm units.
3363
3364
 
3364
3365
  ###### Parameters
@@ -3376,8 +3377,8 @@ object with h (height) and unit properties
3376
3377
  ###### Example
3377
3378
 
3378
3379
  ```ts
3379
- Utils.parseHeight('100px'); // {h: 100, unit: 'px'}
3380
- Utils.parseHeight('2rem'); // {h: 2, unit: 'rem'}
3380
+ Utils.parseHeight('100px'); // {h: 100, unit: 'px'}
3381
+ Utils.parseHeight('2rem'); // {h: 2, unit: 'rem'}
3381
3382
  Utils.parseHeight(50); // {h: 50, unit: 'px'}
3382
3383
  ```
3383
3384
 
@@ -3449,7 +3450,7 @@ static same(a, b): boolean;
3449
3450
 
3450
3451
  Defined in: [utils.ts:450](https://github.com/adumesny/gridstack.js/blob/master/src/utils.ts#L450)
3451
3452
 
3452
- Compare two objects for equality (shallow comparison).
3453
+ Compare two objects for equality (shallow comparison).
3453
3454
  Checks if objects have the same fields and values at one level deep.
3454
3455
 
3455
3456
  ###### Parameters
@@ -3468,7 +3469,7 @@ true if objects have the same values
3468
3469
  ###### Example
3469
3470
 
3470
3471
  ```ts
3471
- Utils.same({x: 1, y: 2}, {x: 1, y: 2}); // true
3472
+ Utils.same({x: 1, y: 2}, {x: 1, y: 2}); // true
3472
3473
  Utils.same({x: 1}, {x: 1, y: 2}); // false
3473
3474
  ```
3474
3475
 
@@ -3539,8 +3540,8 @@ true if the widget should resize to content
3539
3540
  ###### Example
3540
3541
 
3541
3542
  ```ts
3542
- if (Utils.shouldSizeToContent(node)) {
3543
- // Trigger content-based resizing
3543
+ if (Utils.shouldSizeToContent(node)) {
3544
+ // Trigger content-based resizing
3544
3545
  }
3545
3546
  ```
3546
3547
 
@@ -3553,7 +3554,7 @@ static simulateMouseEvent(
3553
3554
  target?): void;
3554
3555
  ```
3555
3556
 
3556
- Defined in: [utils.ts:734](https://github.com/adumesny/gridstack.js/blob/master/src/utils.ts#L734)
3557
+ Defined in: [utils.ts:700](https://github.com/adumesny/gridstack.js/blob/master/src/utils.ts#L700)
3557
3558
 
3558
3559
  copies the MouseEvent (or convert Touch) properties and sends it as another event to the given target
3559
3560
 
@@ -3595,7 +3596,7 @@ the sorted array (modifies original)
3595
3596
  ###### Example
3596
3597
 
3597
3598
  ```ts
3598
- const sorted = Utils.sort(nodes); // Sort top-left to bottom-right
3599
+ const sorted = Utils.sort(nodes); // Sort top-left to bottom-right
3599
3600
  const reverse = Utils.sort(nodes, -1); // Sort bottom-right to top-left
3600
3601
  ```
3601
3602
 
@@ -3608,7 +3609,7 @@ static swap(
3608
3609
  b): void;
3609
3610
  ```
3610
3611
 
3611
- Defined in: [utils.ts:785](https://github.com/adumesny/gridstack.js/blob/master/src/utils.ts#L785)
3612
+ Defined in: [utils.ts:751](https://github.com/adumesny/gridstack.js/blob/master/src/utils.ts#L751)
3612
3613
 
3613
3614
  swap the given object 2 field values
3614
3615
 
@@ -3659,7 +3660,7 @@ static toBool(v): boolean;
3659
3660
 
3660
3661
  Defined in: [utils.ts:350](https://github.com/adumesny/gridstack.js/blob/master/src/utils.ts#L350)
3661
3662
 
3662
- Convert various value types to boolean.
3663
+ Convert various value types to boolean.
3663
3664
  Handles strings like 'false', 'no', '0' as false.
3664
3665
 
3665
3666
  ###### Parameters
@@ -3677,9 +3678,9 @@ boolean representation
3677
3678
  ###### Example
3678
3679
 
3679
3680
  ```ts
3680
- Utils.toBool('true'); // true
3681
- Utils.toBool('false'); // false
3682
- Utils.toBool('no'); // false
3681
+ Utils.toBool('true'); // true
3682
+ Utils.toBool('false'); // false
3683
+ Utils.toBool('no'); // false
3683
3684
  Utils.toBool('1'); // true
3684
3685
  ```
3685
3686
 
@@ -3708,8 +3709,8 @@ number value, or undefined for null/empty strings
3708
3709
  ###### Example
3709
3710
 
3710
3711
  ```ts
3711
- Utils.toNumber('42'); // 42
3712
- Utils.toNumber(''); // undefined
3712
+ Utils.toNumber('42'); // 42
3713
+ Utils.toNumber(''); // undefined
3713
3714
  Utils.toNumber(null); // undefined
3714
3715
  ```
3715
3716
 
@@ -3762,7 +3763,7 @@ Defines the options for a Grid
3762
3763
  | <a id="removableoptions"></a> `removableOptions?` | [`DDRemoveOpt`](#ddremoveopt) | allows to override UI removable options. (default?: { accept: '.grid-stack-item' }) | [types.ts:351](https://github.com/adumesny/gridstack.js/blob/master/src/types.ts#L351) |
3763
3764
  | <a id="resizable-4"></a> `resizable?` | [`DDResizeOpt`](#ddresizeopt) | allows to override UI resizable options. default is { handles: 'se', autoHide: true on desktop, false on mobile } | [types.ts:341](https://github.com/adumesny/gridstack.js/blob/master/src/types.ts#L341) |
3764
3765
  | <a id="row"></a> `row?` | `number` | fix grid number of rows. This is a shortcut of writing `minRow:N, maxRow:N`. (default `0` no constrain) | [types.ts:354](https://github.com/adumesny/gridstack.js/blob/master/src/types.ts#L354) |
3765
- | <a id="rtl"></a> `rtl?` | `boolean` \| `"auto"` | if true turns grid to RTL. Possible values are true, false, 'auto' (default?: 'auto') See [example](http://gridstack.github.io/gridstack.js/demo/right-to-left(rtl).html) | [types.ts:360](https://github.com/adumesny/gridstack.js/blob/master/src/types.ts#L360) |
3766
+ | <a id="rtl-2"></a> `rtl?` | `boolean` \| `"auto"` | if true turns grid to RTL. Possible values are true, false, 'auto' (default?: 'auto') See [example](http://gridstack.github.io/gridstack.js/demo/right-to-left(rtl).html) | [types.ts:360](https://github.com/adumesny/gridstack.js/blob/master/src/types.ts#L360) |
3766
3767
  | <a id="sizetocontent-1"></a> `sizeToContent?` | `boolean` | set to true if all grid items (by default, but item can also override) height should be based on content size instead of WidgetItem.h to avoid v-scrollbars. Note: this is still row based, not pixels, so it will use ceil(getBoundingClientRect().height / getCellHeight()) | [types.ts:365](https://github.com/adumesny/gridstack.js/blob/master/src/types.ts#L365) |
3767
3768
  | <a id="staticgrid"></a> `staticGrid?` | `boolean` | makes grid static (default?: false). If `true` widgets are not movable/resizable. You don't even need draggable/resizable. A CSS class 'grid-stack-static' is also added to the element. | [types.ts:372](https://github.com/adumesny/gridstack.js/blob/master/src/types.ts#L372) |
3768
3769
  | <a id="styleinhead"></a> ~~`styleInHead?`~~ | `boolean` | **Deprecated** Not used anymore, styles are now implemented with local CSS variables | [types.ts:377](https://github.com/adumesny/gridstack.js/blob/master/src/types.ts#L377) |
@@ -3977,7 +3978,7 @@ Note: Use enable()/disable() methods to change state as other operations need to
3977
3978
  new DDDraggable(el, option): DDDraggable;
3978
3979
  ```
3979
3980
 
3980
- Defined in: [dd-draggable.ts:65](https://github.com/adumesny/gridstack.js/blob/master/src/dd-draggable.ts#L65)
3981
+ Defined in: [dd-draggable.ts:69](https://github.com/adumesny/gridstack.js/blob/master/src/dd-draggable.ts#L69)
3981
3982
 
3982
3983
  ###### Parameters
3983
3984
 
@@ -4002,7 +4003,7 @@ Defined in: [dd-draggable.ts:65](https://github.com/adumesny/gridstack.js/blob/m
4002
4003
  destroy(): void;
4003
4004
  ```
4004
4005
 
4005
- Defined in: [dd-draggable.ts:118](https://github.com/adumesny/gridstack.js/blob/master/src/dd-draggable.ts#L118)
4006
+ Defined in: [dd-draggable.ts:131](https://github.com/adumesny/gridstack.js/blob/master/src/dd-draggable.ts#L131)
4006
4007
 
4007
4008
  Destroy this drag & drop implementation and clean up resources.
4008
4009
  Removes all event handlers and clears internal state.
@@ -4021,7 +4022,7 @@ Removes all event handlers and clears internal state.
4021
4022
  disable(forDestroy): void;
4022
4023
  ```
4023
4024
 
4024
- Defined in: [dd-draggable.ts:105](https://github.com/adumesny/gridstack.js/blob/master/src/dd-draggable.ts#L105)
4025
+ Defined in: [dd-draggable.ts:118](https://github.com/adumesny/gridstack.js/blob/master/src/dd-draggable.ts#L118)
4025
4026
 
4026
4027
  Disable this drag & drop implementation.
4027
4028
  Subclasses should override to perform additional cleanup.
@@ -4046,7 +4047,7 @@ Subclasses should override to perform additional cleanup.
4046
4047
  enable(): void;
4047
4048
  ```
4048
4049
 
4049
- Defined in: [dd-draggable.ts:91](https://github.com/adumesny/gridstack.js/blob/master/src/dd-draggable.ts#L91)
4050
+ Defined in: [dd-draggable.ts:104](https://github.com/adumesny/gridstack.js/blob/master/src/dd-draggable.ts#L104)
4050
4051
 
4051
4052
  Enable this drag & drop implementation.
4052
4053
  Subclasses should override to perform additional setup.
@@ -4059,13 +4060,27 @@ Subclasses should override to perform additional setup.
4059
4060
 
4060
4061
  [`DDBaseImplement`](#ddbaseimplement).[`enable`](#enable)
4061
4062
 
4063
+ ##### getAllHandles()
4064
+
4065
+ ```ts
4066
+ protected getAllHandles(): HTMLElement[];
4067
+ ```
4068
+
4069
+ Defined in: [dd-draggable.ts:88](https://github.com/adumesny/gridstack.js/blob/master/src/dd-draggable.ts#L88)
4070
+
4071
+ return all handles omitting other nested `.grid-stack-item` children (in case node.subGrid isn't set for some reason)
4072
+
4073
+ ###### Returns
4074
+
4075
+ `HTMLElement`[]
4076
+
4062
4077
  ##### off()
4063
4078
 
4064
4079
  ```ts
4065
4080
  off(event): void;
4066
4081
  ```
4067
4082
 
4068
- Defined in: [dd-draggable.ts:87](https://github.com/adumesny/gridstack.js/blob/master/src/dd-draggable.ts#L87)
4083
+ Defined in: [dd-draggable.ts:100](https://github.com/adumesny/gridstack.js/blob/master/src/dd-draggable.ts#L100)
4069
4084
 
4070
4085
  Unregister an event callback for the specified event.
4071
4086
 
@@ -4089,7 +4104,7 @@ Unregister an event callback for the specified event.
4089
4104
  on(event, callback): void;
4090
4105
  ```
4091
4106
 
4092
- Defined in: [dd-draggable.ts:83](https://github.com/adumesny/gridstack.js/blob/master/src/dd-draggable.ts#L83)
4107
+ Defined in: [dd-draggable.ts:96](https://github.com/adumesny/gridstack.js/blob/master/src/dd-draggable.ts#L96)
4093
4108
 
4094
4109
  Register an event callback for the specified event.
4095
4110
 
@@ -4141,7 +4156,7 @@ Result from the callback function, if any
4141
4156
  updateOption(opts): DDDraggable;
4142
4157
  ```
4143
4158
 
4144
- Defined in: [dd-draggable.ts:129](https://github.com/adumesny/gridstack.js/blob/master/src/dd-draggable.ts#L129)
4159
+ Defined in: [dd-draggable.ts:142](https://github.com/adumesny/gridstack.js/blob/master/src/dd-draggable.ts#L142)
4145
4160
 
4146
4161
  Method to update the options and return the DD implementation
4147
4162
 
@@ -4163,9 +4178,11 @@ Method to update the options and return the DD implementation
4163
4178
 
4164
4179
  | Property | Modifier | Type | Default value | Description | Defined in |
4165
4180
  | ------ | ------ | ------ | ------ | ------ | ------ |
4166
- | <a id="el"></a> `el` | `public` | [`GridItemHTMLElement`](#griditemhtmlelement) | `undefined` | The HTML element being extended | [dd-draggable.ts:65](https://github.com/adumesny/gridstack.js/blob/master/src/dd-draggable.ts#L65) |
4181
+ | <a id="_autoscrollcontainer"></a> `_autoScrollContainer?` | `protected` | `HTMLElement` | `undefined` | - | [dd-draggable.ts:66](https://github.com/adumesny/gridstack.js/blob/master/src/dd-draggable.ts#L66) |
4182
+ | <a id="_autoscrollmaxspeed"></a> `_autoScrollMaxSpeed?` | `protected` | `number` | `undefined` | - | [dd-draggable.ts:67](https://github.com/adumesny/gridstack.js/blob/master/src/dd-draggable.ts#L67) |
4183
+ | <a id="el"></a> `el` | `public` | [`GridItemHTMLElement`](#griditemhtmlelement) | `undefined` | The HTML element being extended | [dd-draggable.ts:69](https://github.com/adumesny/gridstack.js/blob/master/src/dd-draggable.ts#L69) |
4167
4184
  | <a id="helper"></a> `helper` | `public` | `HTMLElement` | `undefined` | - | [dd-draggable.ts:35](https://github.com/adumesny/gridstack.js/blob/master/src/dd-draggable.ts#L35) |
4168
- | <a id="option"></a> `option` | `public` | [`DDDragOpt`](#dddragopt) | `{}` | The drag & drop options/configuration | [dd-draggable.ts:65](https://github.com/adumesny/gridstack.js/blob/master/src/dd-draggable.ts#L65) |
4185
+ | <a id="option"></a> `option` | `public` | [`DDDragOpt`](#dddragopt) | `{}` | The drag & drop options/configuration | [dd-draggable.ts:69](https://github.com/adumesny/gridstack.js/blob/master/src/dd-draggable.ts#L69) |
4169
4186
 
4170
4187
  ***
4171
4188
 
@@ -4285,7 +4302,7 @@ Subclasses should override to perform additional cleanup.
4285
4302
  drop(e): void;
4286
4303
  ```
4287
4304
 
4288
- Defined in: [dd-droppable.ts:143](https://github.com/adumesny/gridstack.js/blob/master/src/dd-droppable.ts#L143)
4305
+ Defined in: [dd-droppable.ts:146](https://github.com/adumesny/gridstack.js/blob/master/src/dd-droppable.ts#L146)
4289
4306
 
4290
4307
  item is being dropped on us - called by the drag mouseup handler - this calls the client drop event
4291
4308
 
@@ -4646,7 +4663,7 @@ draggable(
4646
4663
  value?): DDGridStack;
4647
4664
  ```
4648
4665
 
4649
- Defined in: [dd-gridstack.ts:120](https://github.com/adumesny/gridstack.js/blob/master/src/dd-gridstack.ts#L120)
4666
+ Defined in: [dd-gridstack.ts:122](https://github.com/adumesny/gridstack.js/blob/master/src/dd-gridstack.ts#L122)
4650
4667
 
4651
4668
  Enable/disable/configure dragging for grid elements.
4652
4669
 
@@ -4678,7 +4695,7 @@ dd.draggable(element, {handle: '.drag-handle'}); // Configure drag handle
4678
4695
  dragIn(el, opts): DDGridStack;
4679
4696
  ```
4680
4697
 
4681
- Defined in: [dd-gridstack.ts:144](https://github.com/adumesny/gridstack.js/blob/master/src/dd-gridstack.ts#L144)
4698
+ Defined in: [dd-gridstack.ts:147](https://github.com/adumesny/gridstack.js/blob/master/src/dd-gridstack.ts#L147)
4682
4699
 
4683
4700
  ###### Parameters
4684
4701
 
@@ -4701,7 +4718,7 @@ droppable(
4701
4718
  value?): DDGridStack;
4702
4719
  ```
4703
4720
 
4704
- Defined in: [dd-gridstack.ts:149](https://github.com/adumesny/gridstack.js/blob/master/src/dd-gridstack.ts#L149)
4721
+ Defined in: [dd-gridstack.ts:152](https://github.com/adumesny/gridstack.js/blob/master/src/dd-gridstack.ts#L152)
4705
4722
 
4706
4723
  ###### Parameters
4707
4724
 
@@ -4722,7 +4739,7 @@ Defined in: [dd-gridstack.ts:149](https://github.com/adumesny/gridstack.js/blob/
4722
4739
  isDraggable(el): boolean;
4723
4740
  ```
4724
4741
 
4725
- Defined in: [dd-gridstack.ts:174](https://github.com/adumesny/gridstack.js/blob/master/src/dd-gridstack.ts#L174)
4742
+ Defined in: [dd-gridstack.ts:177](https://github.com/adumesny/gridstack.js/blob/master/src/dd-gridstack.ts#L177)
4726
4743
 
4727
4744
  true if element is draggable
4728
4745
 
@@ -4742,7 +4759,7 @@ true if element is draggable
4742
4759
  isDroppable(el): boolean;
4743
4760
  ```
4744
4761
 
4745
- Defined in: [dd-gridstack.ts:169](https://github.com/adumesny/gridstack.js/blob/master/src/dd-gridstack.ts#L169)
4762
+ Defined in: [dd-gridstack.ts:172](https://github.com/adumesny/gridstack.js/blob/master/src/dd-gridstack.ts#L172)
4746
4763
 
4747
4764
  true if element is droppable
4748
4765
 
@@ -4762,7 +4779,7 @@ true if element is droppable
4762
4779
  isResizable(el): boolean;
4763
4780
  ```
4764
4781
 
4765
- Defined in: [dd-gridstack.ts:179](https://github.com/adumesny/gridstack.js/blob/master/src/dd-gridstack.ts#L179)
4782
+ Defined in: [dd-gridstack.ts:182](https://github.com/adumesny/gridstack.js/blob/master/src/dd-gridstack.ts#L182)
4766
4783
 
4767
4784
  true if element is draggable
4768
4785
 
@@ -4782,7 +4799,7 @@ true if element is draggable
4782
4799
  off(el, name): DDGridStack;
4783
4800
  ```
4784
4801
 
4785
- Defined in: [dd-gridstack.ts:195](https://github.com/adumesny/gridstack.js/blob/master/src/dd-gridstack.ts#L195)
4802
+ Defined in: [dd-gridstack.ts:198](https://github.com/adumesny/gridstack.js/blob/master/src/dd-gridstack.ts#L198)
4786
4803
 
4787
4804
  ###### Parameters
4788
4805
 
@@ -4804,7 +4821,7 @@ on(
4804
4821
  callback): DDGridStack;
4805
4822
  ```
4806
4823
 
4807
- Defined in: [dd-gridstack.ts:183](https://github.com/adumesny/gridstack.js/blob/master/src/dd-gridstack.ts#L183)
4824
+ Defined in: [dd-gridstack.ts:186](https://github.com/adumesny/gridstack.js/blob/master/src/dd-gridstack.ts#L186)
4808
4825
 
4809
4826
  ###### Parameters
4810
4827
 
@@ -4894,7 +4911,7 @@ new DDManager(): DDManager;
4894
4911
  <a id="ddresizable-1"></a>
4895
4912
  ### DDResizable
4896
4913
 
4897
- Defined in: [dd-resizable.ts:32](https://github.com/adumesny/gridstack.js/blob/master/src/dd-resizable.ts#L32)
4914
+ Defined in: [dd-resizable.ts:41](https://github.com/adumesny/gridstack.js/blob/master/src/dd-resizable.ts#L41)
4898
4915
 
4899
4916
  Interface for HTML elements extended with drag & drop options.
4900
4917
  Used to associate DD configuration with DOM elements.
@@ -4938,7 +4955,7 @@ Note: Use enable()/disable() methods to change state as other operations need to
4938
4955
  new DDResizable(el, option): DDResizable;
4939
4956
  ```
4940
4957
 
4941
- Defined in: [dd-resizable.ts:59](https://github.com/adumesny/gridstack.js/blob/master/src/dd-resizable.ts#L59)
4958
+ Defined in: [dd-resizable.ts:68](https://github.com/adumesny/gridstack.js/blob/master/src/dd-resizable.ts#L68)
4942
4959
 
4943
4960
  ###### Parameters
4944
4961
 
@@ -4963,7 +4980,7 @@ Defined in: [dd-resizable.ts:59](https://github.com/adumesny/gridstack.js/blob/m
4963
4980
  destroy(): void;
4964
4981
  ```
4965
4982
 
4966
- Defined in: [dd-resizable.ts:89](https://github.com/adumesny/gridstack.js/blob/master/src/dd-resizable.ts#L89)
4983
+ Defined in: [dd-resizable.ts:98](https://github.com/adumesny/gridstack.js/blob/master/src/dd-resizable.ts#L98)
4967
4984
 
4968
4985
  Destroy this drag & drop implementation and clean up resources.
4969
4986
  Removes all event handlers and clears internal state.
@@ -4982,7 +4999,7 @@ Removes all event handlers and clears internal state.
4982
4999
  disable(): void;
4983
5000
  ```
4984
5001
 
4985
- Defined in: [dd-resizable.ts:83](https://github.com/adumesny/gridstack.js/blob/master/src/dd-resizable.ts#L83)
5002
+ Defined in: [dd-resizable.ts:92](https://github.com/adumesny/gridstack.js/blob/master/src/dd-resizable.ts#L92)
4986
5003
 
4987
5004
  Disable this drag & drop implementation.
4988
5005
  Subclasses should override to perform additional cleanup.
@@ -5001,7 +5018,7 @@ Subclasses should override to perform additional cleanup.
5001
5018
  enable(): void;
5002
5019
  ```
5003
5020
 
5004
- Defined in: [dd-resizable.ts:77](https://github.com/adumesny/gridstack.js/blob/master/src/dd-resizable.ts#L77)
5021
+ Defined in: [dd-resizable.ts:86](https://github.com/adumesny/gridstack.js/blob/master/src/dd-resizable.ts#L86)
5005
5022
 
5006
5023
  Enable this drag & drop implementation.
5007
5024
  Subclasses should override to perform additional setup.
@@ -5020,7 +5037,7 @@ Subclasses should override to perform additional setup.
5020
5037
  off(event): void;
5021
5038
  ```
5022
5039
 
5023
- Defined in: [dd-resizable.ts:73](https://github.com/adumesny/gridstack.js/blob/master/src/dd-resizable.ts#L73)
5040
+ Defined in: [dd-resizable.ts:82](https://github.com/adumesny/gridstack.js/blob/master/src/dd-resizable.ts#L82)
5024
5041
 
5025
5042
  Unregister an event callback for the specified event.
5026
5043
 
@@ -5044,7 +5061,7 @@ Unregister an event callback for the specified event.
5044
5061
  on(event, callback): void;
5045
5062
  ```
5046
5063
 
5047
- Defined in: [dd-resizable.ts:69](https://github.com/adumesny/gridstack.js/blob/master/src/dd-resizable.ts#L69)
5064
+ Defined in: [dd-resizable.ts:78](https://github.com/adumesny/gridstack.js/blob/master/src/dd-resizable.ts#L78)
5048
5065
 
5049
5066
  Register an event callback for the specified event.
5050
5067
 
@@ -5096,7 +5113,7 @@ Result from the callback function, if any
5096
5113
  updateOption(opts): DDResizable;
5097
5114
  ```
5098
5115
 
5099
- Defined in: [dd-resizable.ts:96](https://github.com/adumesny/gridstack.js/blob/master/src/dd-resizable.ts#L96)
5116
+ Defined in: [dd-resizable.ts:105](https://github.com/adumesny/gridstack.js/blob/master/src/dd-resizable.ts#L105)
5100
5117
 
5101
5118
  Method to update the options and return the DD implementation
5102
5119
 
@@ -5118,8 +5135,8 @@ Method to update the options and return the DD implementation
5118
5135
 
5119
5136
  | Property | Modifier | Type | Default value | Description | Defined in |
5120
5137
  | ------ | ------ | ------ | ------ | ------ | ------ |
5121
- | <a id="el-3"></a> `el` | `public` | [`GridItemHTMLElement`](#griditemhtmlelement) | `undefined` | The HTML element being extended | [dd-resizable.ts:59](https://github.com/adumesny/gridstack.js/blob/master/src/dd-resizable.ts#L59) |
5122
- | <a id="option-2"></a> `option` | `public` | [`DDResizableOpt`](#ddresizableopt) | `{}` | The drag & drop options/configuration | [dd-resizable.ts:59](https://github.com/adumesny/gridstack.js/blob/master/src/dd-resizable.ts#L59) |
5138
+ | <a id="el-3"></a> `el` | `public` | [`GridItemHTMLElement`](#griditemhtmlelement) | `undefined` | The HTML element being extended | [dd-resizable.ts:68](https://github.com/adumesny/gridstack.js/blob/master/src/dd-resizable.ts#L68) |
5139
+ | <a id="option-2"></a> `option` | `public` | [`DDResizableOpt`](#ddresizableopt) | `{}` | The drag & drop options/configuration | [dd-resizable.ts:68](https://github.com/adumesny/gridstack.js/blob/master/src/dd-resizable.ts#L68) |
5123
5140
 
5124
5141
  ***
5125
5142
 
@@ -5200,7 +5217,7 @@ Used with the responsive.breakpoints option.
5200
5217
  <a id="cellposition"></a>
5201
5218
  ### CellPosition
5202
5219
 
5203
- Defined in: [gridstack.ts:56](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L56)
5220
+ Defined in: [gridstack.ts:57](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L57)
5204
5221
 
5205
5222
  Defines the position of a cell inside the grid
5206
5223
 
@@ -5208,8 +5225,8 @@ Defines the position of a cell inside the grid
5208
5225
 
5209
5226
  | Property | Type | Defined in |
5210
5227
  | ------ | ------ | ------ |
5211
- | <a id="x"></a> `x` | `number` | [gridstack.ts:57](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L57) |
5212
- | <a id="y"></a> `y` | `number` | [gridstack.ts:58](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L58) |
5228
+ | <a id="x"></a> `x` | `number` | [gridstack.ts:58](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L58) |
5229
+ | <a id="y"></a> `y` | `number` | [gridstack.ts:59](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L59) |
5213
5230
 
5214
5231
  ***
5215
5232
 
@@ -5230,6 +5247,7 @@ Drag&Drop dragging options
5230
5247
  | <a id="handle"></a> `handle?` | `string` | class selector of items that can be dragged. default to '.grid-stack-item-content' | [types.ts:485](https://github.com/adumesny/gridstack.js/blob/master/src/types.ts#L485) |
5231
5248
  | <a id="helper-1"></a> `helper?` | `"clone"` \| (`el`) => `HTMLElement` | helper function when dropping: 'clone' or your own method | [types.ts:495](https://github.com/adumesny/gridstack.js/blob/master/src/types.ts#L495) |
5232
5249
  | <a id="pause"></a> `pause?` | `number` \| `boolean` | if set (true | msec), dragging placement (collision) will only happen after a pause by the user. Note: this is Global | [types.ts:489](https://github.com/adumesny/gridstack.js/blob/master/src/types.ts#L489) |
5250
+ | <a id="rtl"></a> `rtl?` | `boolean` | - | [types.ts:500](https://github.com/adumesny/gridstack.js/blob/master/src/types.ts#L500) |
5233
5251
  | <a id="scroll"></a> `scroll?` | `boolean` | default to `true` | [types.ts:491](https://github.com/adumesny/gridstack.js/blob/master/src/types.ts#L491) |
5234
5252
  | <a id="start"></a> `start?` | (`event`, `ui`) => `void` | callbacks | [types.ts:497](https://github.com/adumesny/gridstack.js/blob/master/src/types.ts#L497) |
5235
5253
  | <a id="stop"></a> `stop?` | (`event`) => `void` | - | [types.ts:498](https://github.com/adumesny/gridstack.js/blob/master/src/types.ts#L498) |
@@ -5330,6 +5348,7 @@ Drag&Drop resize options
5330
5348
  | <a id="minheight"></a> `minHeight?` | `number` | - | - | [dd-resizable.ts:20](https://github.com/adumesny/gridstack.js/blob/master/src/dd-resizable.ts#L20) |
5331
5349
  | <a id="minwidth"></a> `minWidth?` | `number` | - | - | [dd-resizable.ts:21](https://github.com/adumesny/gridstack.js/blob/master/src/dd-resizable.ts#L21) |
5332
5350
  | <a id="resize"></a> `resize?` | (`event`, `ui`) => `void` | - | - | [dd-resizable.ts:24](https://github.com/adumesny/gridstack.js/blob/master/src/dd-resizable.ts#L24) |
5351
+ | <a id="rtl-1"></a> `rtl?` | `boolean` | - | - | [dd-resizable.ts:25](https://github.com/adumesny/gridstack.js/blob/master/src/dd-resizable.ts#L25) |
5333
5352
  | <a id="start-2"></a> `start?` | (`event`, `ui`) => `void` | - | - | [dd-resizable.ts:22](https://github.com/adumesny/gridstack.js/blob/master/src/dd-resizable.ts#L22) |
5334
5353
  | <a id="stop-2"></a> `stop?` | (`event`) => `void` | - | - | [dd-resizable.ts:23](https://github.com/adumesny/gridstack.js/blob/master/src/dd-resizable.ts#L23) |
5335
5354
 
@@ -5359,7 +5378,7 @@ Drag&Drop resize options
5359
5378
  <a id="dduidata"></a>
5360
5379
  ### DDUIData
5361
5380
 
5362
- Defined in: [types.ts:512](https://github.com/adumesny/gridstack.js/blob/master/src/types.ts#L512)
5381
+ Defined in: [types.ts:518](https://github.com/adumesny/gridstack.js/blob/master/src/types.ts#L518)
5363
5382
 
5364
5383
  data that is passed during drag and resizing callbacks
5365
5384
 
@@ -5367,9 +5386,9 @@ data that is passed during drag and resizing callbacks
5367
5386
 
5368
5387
  | Property | Type | Defined in |
5369
5388
  | ------ | ------ | ------ |
5370
- | <a id="draggable-2"></a> `draggable?` | `HTMLElement` | [types.ts:515](https://github.com/adumesny/gridstack.js/blob/master/src/types.ts#L515) |
5371
- | <a id="position"></a> `position?` | [`Position`](#position-1) | [types.ts:513](https://github.com/adumesny/gridstack.js/blob/master/src/types.ts#L513) |
5372
- | <a id="size"></a> `size?` | [`Size`](#size-1) | [types.ts:514](https://github.com/adumesny/gridstack.js/blob/master/src/types.ts#L514) |
5389
+ | <a id="draggable-2"></a> `draggable?` | `HTMLElement` | [types.ts:521](https://github.com/adumesny/gridstack.js/blob/master/src/types.ts#L521) |
5390
+ | <a id="position"></a> `position?` | [`Position`](#position-1) | [types.ts:519](https://github.com/adumesny/gridstack.js/blob/master/src/types.ts#L519) |
5391
+ | <a id="size"></a> `size?` | [`Size`](#size-1) | [types.ts:520](https://github.com/adumesny/gridstack.js/blob/master/src/types.ts#L520) |
5373
5392
 
5374
5393
  ***
5375
5394
 
@@ -5392,7 +5411,7 @@ Defined in: [utils.ts:13](https://github.com/adumesny/gridstack.js/blob/master/s
5392
5411
  <a id="gridhtmlelement"></a>
5393
5412
  ### GridHTMLElement
5394
5413
 
5395
- Defined in: [gridstack.ts:42](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L42)
5414
+ Defined in: [gridstack.ts:43](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L43)
5396
5415
 
5397
5416
  #### Extends
5398
5417
 
@@ -5402,7 +5421,7 @@ Defined in: [gridstack.ts:42](https://github.com/adumesny/gridstack.js/blob/mast
5402
5421
 
5403
5422
  | Property | Type | Defined in |
5404
5423
  | ------ | ------ | ------ |
5405
- | <a id="gridstack"></a> `gridstack?` | [`GridStack`](#gridstack-1) | [gridstack.ts:43](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L43) |
5424
+ | <a id="gridstack"></a> `gridstack?` | [`GridStack`](#gridstack-1) | [gridstack.ts:44](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L44) |
5406
5425
 
5407
5426
  ***
5408
5427
 
@@ -5449,6 +5468,25 @@ options used during creation - similar to GridStackOptions
5449
5468
 
5450
5469
  ***
5451
5470
 
5471
+ <a id="gridstackmouseevent"></a>
5472
+ ### GridStackMouseEvent
5473
+
5474
+ Defined in: [types.ts:585](https://github.com/adumesny/gridstack.js/blob/master/src/types.ts#L585)
5475
+
5476
+ #### Extends
5477
+
5478
+ - `MouseEvent`
5479
+
5480
+ #### Properties
5481
+
5482
+ | Property | Type | Defined in |
5483
+ | ------ | ------ | ------ |
5484
+ | <a id="hasmovedx"></a> `hasMovedX?` | `boolean` | [types.ts:587](https://github.com/adumesny/gridstack.js/blob/master/src/types.ts#L587) |
5485
+ | <a id="hasmovedy"></a> `hasMovedY?` | `boolean` | [types.ts:588](https://github.com/adumesny/gridstack.js/blob/master/src/types.ts#L588) |
5486
+ | <a id="resizedir"></a> `resizeDir?` | `string` | [types.ts:586](https://github.com/adumesny/gridstack.js/blob/master/src/types.ts#L586) |
5487
+
5488
+ ***
5489
+
5452
5490
  <a id="gridstackmoveopts"></a>
5453
5491
  ### GridStackMoveOpts
5454
5492
 
@@ -5487,7 +5525,7 @@ options used during GridStackEngine.moveNode()
5487
5525
  <a id="gridstacknode-2"></a>
5488
5526
  ### GridStackNode
5489
5527
 
5490
- Defined in: [types.ts:529](https://github.com/adumesny/gridstack.js/blob/master/src/types.ts#L529)
5528
+ Defined in: [types.ts:535](https://github.com/adumesny/gridstack.js/blob/master/src/types.ts#L535)
5491
5529
 
5492
5530
  internal runtime descriptions describing the widgets in the grid
5493
5531
 
@@ -5501,8 +5539,8 @@ internal runtime descriptions describing the widgets in the grid
5501
5539
  | ------ | ------ | ------ | ------ | ------ |
5502
5540
  | <a id="autoposition"></a> `autoPosition?` | `boolean` | if true then x, y parameters will be ignored and widget will be places on the first available position (default?: false) | [`GridStackWidget`](#gridstackwidget).[`autoPosition`](#autoposition-1) | [types.ts:428](https://github.com/adumesny/gridstack.js/blob/master/src/types.ts#L428) |
5503
5541
  | <a id="content"></a> `content?` | `string` | html to append inside as content | [`GridStackWidget`](#gridstackwidget).[`content`](#content-1) | [types.ts:446](https://github.com/adumesny/gridstack.js/blob/master/src/types.ts#L446) |
5504
- | <a id="el-5"></a> `el?` | [`GridItemHTMLElement`](#griditemhtmlelement) | pointer back to HTML element | - | [types.ts:531](https://github.com/adumesny/gridstack.js/blob/master/src/types.ts#L531) |
5505
- | <a id="grid"></a> `grid?` | [`GridStack`](#gridstack-1) | pointer back to parent Grid instance | - | [types.ts:533](https://github.com/adumesny/gridstack.js/blob/master/src/types.ts#L533) |
5542
+ | <a id="el-5"></a> `el?` | [`GridItemHTMLElement`](#griditemhtmlelement) | pointer back to HTML element | - | [types.ts:537](https://github.com/adumesny/gridstack.js/blob/master/src/types.ts#L537) |
5543
+ | <a id="grid"></a> `grid?` | [`GridStack`](#gridstack-1) | pointer back to parent Grid instance | - | [types.ts:539](https://github.com/adumesny/gridstack.js/blob/master/src/types.ts#L539) |
5506
5544
  | <a id="h-1"></a> `h?` | `number` | widget dimension height (default?: 1) | [`GridStackWidget`](#gridstackwidget).[`h`](#h-3) | [types.ts:420](https://github.com/adumesny/gridstack.js/blob/master/src/types.ts#L420) |
5507
5545
  | <a id="id"></a> `id?` | `string` | value for `gs-id` stored on the widget (default?: undefined) | [`GridStackWidget`](#gridstackwidget).[`id`](#id-1) | [types.ts:444](https://github.com/adumesny/gridstack.js/blob/master/src/types.ts#L444) |
5508
5546
  | <a id="lazyload"></a> `lazyLoad?` | `boolean` | true when widgets are only created when they scroll into view (visible) | [`GridStackWidget`](#gridstackwidget).[`lazyLoad`](#lazyload-2) | [types.ts:448](https://github.com/adumesny/gridstack.js/blob/master/src/types.ts#L448) |
@@ -5515,9 +5553,9 @@ internal runtime descriptions describing the widgets in the grid
5515
5553
  | <a id="noresize"></a> `noResize?` | `boolean` | prevent direct resizing by the user (default?: undefined = un-constrained) | [`GridStackWidget`](#gridstackwidget).[`noResize`](#noresize-1) | [types.ts:438](https://github.com/adumesny/gridstack.js/blob/master/src/types.ts#L438) |
5516
5554
  | <a id="resizetocontentparent-1"></a> `resizeToContentParent?` | `string` | local override of GridStack.resizeToContentParent that specify the class to use for the parent (actual) vs child (wanted) height | [`GridStackWidget`](#gridstackwidget).[`resizeToContentParent`](#resizetocontentparent-2) | [types.ts:453](https://github.com/adumesny/gridstack.js/blob/master/src/types.ts#L453) |
5517
5555
  | <a id="sizetocontent"></a> `sizeToContent?` | `number` \| `boolean` | local (vs grid) override - see GridStackOptions. Note: This also allow you to set a maximum h value (but user changeable during normal resizing) to prevent unlimited content from taking too much space (get scrollbar) | [`GridStackWidget`](#gridstackwidget).[`sizeToContent`](#sizetocontent-2) | [types.ts:451](https://github.com/adumesny/gridstack.js/blob/master/src/types.ts#L451) |
5518
- | <a id="subgrid"></a> `subGrid?` | [`GridStack`](#gridstack-1) | actual sub-grid instance | - | [types.ts:535](https://github.com/adumesny/gridstack.js/blob/master/src/types.ts#L535) |
5556
+ | <a id="subgrid"></a> `subGrid?` | [`GridStack`](#gridstack-1) | actual sub-grid instance | - | [types.ts:541](https://github.com/adumesny/gridstack.js/blob/master/src/types.ts#L541) |
5519
5557
  | <a id="subgridopts"></a> `subGridOpts?` | [`GridStackOptions`](#gridstackoptions) | optional nested grid options and list of children, which then turns into actual instance at runtime to get options from | [`GridStackWidget`](#gridstackwidget).[`subGridOpts`](#subgridopts-2) | [types.ts:455](https://github.com/adumesny/gridstack.js/blob/master/src/types.ts#L455) |
5520
- | <a id="visibleobservable"></a> `visibleObservable?` | `IntersectionObserver` | allow delay creation when visible | - | [types.ts:537](https://github.com/adumesny/gridstack.js/blob/master/src/types.ts#L537) |
5558
+ | <a id="visibleobservable"></a> `visibleObservable?` | `IntersectionObserver` | allow delay creation when visible | - | [types.ts:543](https://github.com/adumesny/gridstack.js/blob/master/src/types.ts#L543) |
5521
5559
  | <a id="w-2"></a> `w?` | `number` | widget dimension width (default?: 1) | [`GridStackWidget`](#gridstackwidget).[`w`](#w-4) | [types.ts:418](https://github.com/adumesny/gridstack.js/blob/master/src/types.ts#L418) |
5522
5560
  | <a id="x-2"></a> `x?` | `number` | widget position x (default?: 0) | [`GridStackWidget`](#gridstackwidget).[`x`](#x-4) | [types.ts:414](https://github.com/adumesny/gridstack.js/blob/master/src/types.ts#L414) |
5523
5561
  | <a id="y-2"></a> `y?` | `number` | widget position y (default?: 0) | [`GridStackWidget`](#gridstackwidget).[`y`](#y-4) | [types.ts:416](https://github.com/adumesny/gridstack.js/blob/master/src/types.ts#L416) |
@@ -5647,7 +5685,7 @@ Method to update the options and return the DD implementation
5647
5685
  <a id="mouseposition"></a>
5648
5686
  ### MousePosition
5649
5687
 
5650
- Defined in: [gridstack.ts:50](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L50)
5688
+ Defined in: [gridstack.ts:51](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L51)
5651
5689
 
5652
5690
  Defines the coordinates of an object
5653
5691
 
@@ -5655,15 +5693,15 @@ Defines the coordinates of an object
5655
5693
 
5656
5694
  | Property | Type | Defined in |
5657
5695
  | ------ | ------ | ------ |
5658
- | <a id="left"></a> `left` | `number` | [gridstack.ts:52](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L52) |
5659
- | <a id="top"></a> `top` | `number` | [gridstack.ts:51](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L51) |
5696
+ | <a id="left"></a> `left` | `number` | [gridstack.ts:53](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L53) |
5697
+ | <a id="top"></a> `top` | `number` | [gridstack.ts:52](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L52) |
5660
5698
 
5661
5699
  ***
5662
5700
 
5663
5701
  <a id="position-1"></a>
5664
5702
  ### Position
5665
5703
 
5666
- Defined in: [types.ts:505](https://github.com/adumesny/gridstack.js/blob/master/src/types.ts#L505)
5704
+ Defined in: [types.ts:506](https://github.com/adumesny/gridstack.js/blob/master/src/types.ts#L506)
5667
5705
 
5668
5706
  #### Extended by
5669
5707
 
@@ -5671,17 +5709,17 @@ Defined in: [types.ts:505](https://github.com/adumesny/gridstack.js/blob/master/
5671
5709
 
5672
5710
  #### Properties
5673
5711
 
5674
- | Property | Type | Defined in |
5675
- | ------ | ------ | ------ |
5676
- | <a id="left-1"></a> `left` | `number` | [types.ts:507](https://github.com/adumesny/gridstack.js/blob/master/src/types.ts#L507) |
5677
- | <a id="top-1"></a> `top` | `number` | [types.ts:506](https://github.com/adumesny/gridstack.js/blob/master/src/types.ts#L506) |
5712
+ | Property | Type | Description | Defined in |
5713
+ | ------ | ------ | ------ | ------ |
5714
+ | <a id="left-1"></a> `left` | `number` | Start position of the element on the X axis. In LTR mode, this is the coordinate from the left side. In RTL mode it's actually the coordinate from the right side. | [types.ts:513](https://github.com/adumesny/gridstack.js/blob/master/src/types.ts#L513) |
5715
+ | <a id="top-1"></a> `top` | `number` | - | [types.ts:507](https://github.com/adumesny/gridstack.js/blob/master/src/types.ts#L507) |
5678
5716
 
5679
5717
  ***
5680
5718
 
5681
5719
  <a id="rect-1"></a>
5682
5720
  ### Rect
5683
5721
 
5684
- Defined in: [types.ts:509](https://github.com/adumesny/gridstack.js/blob/master/src/types.ts#L509)
5722
+ Defined in: [types.ts:515](https://github.com/adumesny/gridstack.js/blob/master/src/types.ts#L515)
5685
5723
 
5686
5724
  #### Extends
5687
5725
 
@@ -5689,12 +5727,12 @@ Defined in: [types.ts:509](https://github.com/adumesny/gridstack.js/blob/master/
5689
5727
 
5690
5728
  #### Properties
5691
5729
 
5692
- | Property | Type | Inherited from | Defined in |
5693
- | ------ | ------ | ------ | ------ |
5694
- | <a id="height"></a> `height` | `number` | [`Size`](#size-1).[`height`](#height-1) | [types.ts:503](https://github.com/adumesny/gridstack.js/blob/master/src/types.ts#L503) |
5695
- | <a id="left-2"></a> `left` | `number` | [`Position`](#position-1).[`left`](#left-1) | [types.ts:507](https://github.com/adumesny/gridstack.js/blob/master/src/types.ts#L507) |
5696
- | <a id="top-2"></a> `top` | `number` | [`Position`](#position-1).[`top`](#top-1) | [types.ts:506](https://github.com/adumesny/gridstack.js/blob/master/src/types.ts#L506) |
5697
- | <a id="width"></a> `width` | `number` | [`Size`](#size-1).[`width`](#width-1) | [types.ts:502](https://github.com/adumesny/gridstack.js/blob/master/src/types.ts#L502) |
5730
+ | Property | Type | Description | Inherited from | Defined in |
5731
+ | ------ | ------ | ------ | ------ | ------ |
5732
+ | <a id="height"></a> `height` | `number` | - | [`Size`](#size-1).[`height`](#height-1) | [types.ts:504](https://github.com/adumesny/gridstack.js/blob/master/src/types.ts#L504) |
5733
+ | <a id="left-2"></a> `left` | `number` | Start position of the element on the X axis. In LTR mode, this is the coordinate from the left side. In RTL mode it's actually the coordinate from the right side. | [`Position`](#position-1).[`left`](#left-1) | [types.ts:513](https://github.com/adumesny/gridstack.js/blob/master/src/types.ts#L513) |
5734
+ | <a id="top-2"></a> `top` | `number` | - | [`Position`](#position-1).[`top`](#top-1) | [types.ts:507](https://github.com/adumesny/gridstack.js/blob/master/src/types.ts#L507) |
5735
+ | <a id="width"></a> `width` | `number` | - | [`Size`](#size-1).[`width`](#width-1) | [types.ts:503](https://github.com/adumesny/gridstack.js/blob/master/src/types.ts#L503) |
5698
5736
 
5699
5737
  ***
5700
5738
 
@@ -5723,7 +5761,7 @@ NOTE: Make sure to include the appropriate CSS (gridstack-extra.css) to support
5723
5761
  <a id="size-1"></a>
5724
5762
  ### Size
5725
5763
 
5726
- Defined in: [types.ts:501](https://github.com/adumesny/gridstack.js/blob/master/src/types.ts#L501)
5764
+ Defined in: [types.ts:502](https://github.com/adumesny/gridstack.js/blob/master/src/types.ts#L502)
5727
5765
 
5728
5766
  #### Extended by
5729
5767
 
@@ -5733,8 +5771,8 @@ Defined in: [types.ts:501](https://github.com/adumesny/gridstack.js/blob/master/
5733
5771
 
5734
5772
  | Property | Type | Defined in |
5735
5773
  | ------ | ------ | ------ |
5736
- | <a id="height-1"></a> `height` | `number` | [types.ts:503](https://github.com/adumesny/gridstack.js/blob/master/src/types.ts#L503) |
5737
- | <a id="width-1"></a> `width` | `number` | [types.ts:502](https://github.com/adumesny/gridstack.js/blob/master/src/types.ts#L502) |
5774
+ | <a id="height-1"></a> `height` | `number` | [types.ts:504](https://github.com/adumesny/gridstack.js/blob/master/src/types.ts#L504) |
5775
+ | <a id="width-1"></a> `width` | `number` | [types.ts:503](https://github.com/adumesny/gridstack.js/blob/master/src/types.ts#L503) |
5738
5776
 
5739
5777
  ## Variables
5740
5778
 
@@ -6042,7 +6080,7 @@ type GridStackEvent =
6042
6080
  | "resizecontent";
6043
6081
  ```
6044
6082
 
6045
- Defined in: [gridstack.ts:46](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L46)
6083
+ Defined in: [gridstack.ts:47](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L47)
6046
6084
 
6047
6085
  list of possible events, or space separated list of them
6048
6086