gridstack 10.1.1 → 10.2.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 (133) hide show
  1. package/README.md +1 -1
  2. package/angular/package.json +1 -1
  3. package/dist/angular/esm2020/lib/base-widget.mjs +2 -2
  4. package/dist/angular/esm2020/lib/gridstack-item.component.mjs +2 -2
  5. package/dist/angular/esm2020/lib/gridstack.component.mjs +12 -10
  6. package/dist/angular/esm2020/lib/gridstack.module.mjs +2 -2
  7. package/dist/angular/fesm2015/gridstack-angular.mjs +14 -12
  8. package/dist/angular/fesm2015/gridstack-angular.mjs.map +1 -1
  9. package/dist/angular/fesm2020/gridstack-angular.mjs +14 -12
  10. package/dist/angular/fesm2020/gridstack-angular.mjs.map +1 -1
  11. package/dist/angular/lib/gridstack-item.component.d.ts +1 -1
  12. package/dist/angular/lib/gridstack.component.d.ts +1 -1
  13. package/dist/dd-base-impl.d.ts +1 -1
  14. package/dist/dd-base-impl.js +1 -1
  15. package/dist/dd-base-impl.js.map +1 -1
  16. package/dist/dd-draggable.d.ts +4 -4
  17. package/dist/dd-draggable.js +40 -3
  18. package/dist/dd-draggable.js.map +1 -1
  19. package/dist/dd-droppable.d.ts +1 -1
  20. package/dist/dd-droppable.js +1 -1
  21. package/dist/dd-droppable.js.map +1 -1
  22. package/dist/dd-element.d.ts +1 -1
  23. package/dist/dd-element.js +1 -1
  24. package/dist/dd-element.js.map +1 -1
  25. package/dist/dd-gridstack.d.ts +1 -1
  26. package/dist/dd-gridstack.js +1 -1
  27. package/dist/dd-gridstack.js.map +1 -1
  28. package/dist/dd-manager.d.ts +1 -1
  29. package/dist/dd-manager.js +1 -1
  30. package/dist/dd-manager.js.map +1 -1
  31. package/dist/dd-resizable-handle.d.ts +4 -3
  32. package/dist/dd-resizable-handle.js +12 -1
  33. package/dist/dd-resizable-handle.js.map +1 -1
  34. package/dist/dd-resizable.d.ts +1 -1
  35. package/dist/dd-resizable.js +1 -1
  36. package/dist/dd-resizable.js.map +1 -1
  37. package/dist/dd-touch.d.ts +1 -1
  38. package/dist/dd-touch.js +1 -1
  39. package/dist/dd-touch.js.map +1 -1
  40. package/dist/es5/dd-base-impl.d.ts +1 -1
  41. package/dist/es5/dd-base-impl.js +1 -1
  42. package/dist/es5/dd-base-impl.js.map +1 -1
  43. package/dist/es5/dd-draggable.d.ts +4 -4
  44. package/dist/es5/dd-draggable.js +53 -5
  45. package/dist/es5/dd-draggable.js.map +1 -1
  46. package/dist/es5/dd-droppable.d.ts +1 -1
  47. package/dist/es5/dd-droppable.js +1 -1
  48. package/dist/es5/dd-droppable.js.map +1 -1
  49. package/dist/es5/dd-element.d.ts +1 -1
  50. package/dist/es5/dd-element.js +1 -1
  51. package/dist/es5/dd-element.js.map +1 -1
  52. package/dist/es5/dd-gridstack.d.ts +1 -1
  53. package/dist/es5/dd-gridstack.js +1 -1
  54. package/dist/es5/dd-gridstack.js.map +1 -1
  55. package/dist/es5/dd-manager.d.ts +1 -1
  56. package/dist/es5/dd-manager.js +1 -1
  57. package/dist/es5/dd-manager.js.map +1 -1
  58. package/dist/es5/dd-resizable-handle.d.ts +4 -3
  59. package/dist/es5/dd-resizable-handle.js +13 -1
  60. package/dist/es5/dd-resizable-handle.js.map +1 -1
  61. package/dist/es5/dd-resizable.d.ts +1 -1
  62. package/dist/es5/dd-resizable.js +1 -1
  63. package/dist/es5/dd-resizable.js.map +1 -1
  64. package/dist/es5/dd-touch.d.ts +1 -1
  65. package/dist/es5/dd-touch.js +1 -1
  66. package/dist/es5/dd-touch.js.map +1 -1
  67. package/dist/es5/gridstack-all.js +1 -1
  68. package/dist/es5/gridstack-all.js.LICENSE.txt +1 -1
  69. package/dist/es5/gridstack-all.js.map +1 -1
  70. package/dist/es5/gridstack-engine.d.ts +3 -3
  71. package/dist/es5/gridstack-engine.js +17 -14
  72. package/dist/es5/gridstack-engine.js.map +1 -1
  73. package/dist/es5/gridstack-poly.js +1 -1
  74. package/dist/es5/gridstack.d.ts +11 -4
  75. package/dist/es5/gridstack.js +100 -46
  76. package/dist/es5/gridstack.js.map +1 -1
  77. package/dist/es5/types.d.ts +8 -8
  78. package/dist/es5/types.js +1 -1
  79. package/dist/es5/types.js.map +1 -1
  80. package/dist/es5/utils.d.ts +5 -4
  81. package/dist/es5/utils.js +19 -18
  82. package/dist/es5/utils.js.map +1 -1
  83. package/dist/gridstack-all.js +1 -1
  84. package/dist/gridstack-all.js.LICENSE.txt +1 -1
  85. package/dist/gridstack-all.js.map +1 -1
  86. package/dist/gridstack-engine.d.ts +3 -3
  87. package/dist/gridstack-engine.js +15 -13
  88. package/dist/gridstack-engine.js.map +1 -1
  89. package/dist/gridstack.css +1 -1
  90. package/dist/gridstack.d.ts +11 -4
  91. package/dist/gridstack.js +96 -45
  92. package/dist/gridstack.js.map +1 -1
  93. package/dist/types.d.ts +8 -8
  94. package/dist/types.js +1 -1
  95. package/dist/types.js.map +1 -1
  96. package/dist/utils.d.ts +5 -4
  97. package/dist/utils.js +18 -18
  98. package/dist/utils.js.map +1 -1
  99. package/doc/CHANGES.md +17 -0
  100. package/doc/README.md +10 -4
  101. package/package.json +1 -1
  102. package/angular/projects/demo/.browserslistrc +0 -16
  103. package/angular/projects/demo/src/app/app.component.css +0 -11
  104. package/angular/projects/demo/src/app/app.component.html +0 -110
  105. package/angular/projects/demo/src/app/app.component.spec.ts +0 -25
  106. package/angular/projects/demo/src/app/app.component.ts +0 -221
  107. package/angular/projects/demo/src/app/app.module.ts +0 -39
  108. package/angular/projects/demo/src/app/dummy.component.ts +0 -35
  109. package/angular/projects/demo/src/app/ngFor.ts +0 -131
  110. package/angular/projects/demo/src/app/ngFor_cmd.ts +0 -106
  111. package/angular/projects/demo/src/app/simple.ts +0 -46
  112. package/angular/projects/demo/src/assets/.gitkeep +0 -0
  113. package/angular/projects/demo/src/environments/environment.ts +0 -16
  114. package/angular/projects/demo/src/favicon.ico +0 -0
  115. package/angular/projects/demo/src/index.html +0 -13
  116. package/angular/projects/demo/src/main.ts +0 -12
  117. package/angular/projects/demo/src/polyfills.ts +0 -53
  118. package/angular/projects/demo/src/styles.css +0 -41
  119. package/angular/projects/demo/src/test.ts +0 -26
  120. package/angular/projects/demo/tsconfig.app.json +0 -15
  121. package/angular/projects/demo/tsconfig.spec.json +0 -18
  122. package/angular/projects/lib/src/lib/base-widget.ts +0 -28
  123. package/angular/projects/lib/src/lib/gridstack-item.component.ts +0 -78
  124. package/angular/projects/lib/src/lib/gridstack.component.ts +0 -287
  125. package/angular/projects/lib/src/lib/gridstack.module.ts +0 -32
  126. package/angular/projects/lib/src/public-api.ts +0 -8
  127. package/angular/projects/lib/src/test.ts +0 -27
  128. package/dist/angular/src/base-widget.ts +0 -28
  129. package/dist/angular/src/gridstack-item.component.ts +0 -78
  130. package/dist/angular/src/gridstack.component.ts +0 -287
  131. package/dist/angular/src/gridstack.module.ts +0 -32
  132. package/dist/src/gridstack-extra.scss +0 -25
  133. package/dist/src/gridstack.scss +0 -157
package/dist/gridstack.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * GridStack 10.1.1
2
+ * GridStack 10.2.0
3
3
  * https://gridstackjs.com/
4
4
  *
5
5
  * Copyright (c) 2021-2022 Alain Dumesny
@@ -218,7 +218,8 @@ class GridStack {
218
218
  if (bk?.length > 1)
219
219
  bk.sort((a, b) => (b.w || 0) - (a.w || 0));
220
220
  // elements DOM attributes override any passed options (like CSS style) - merge the two together
221
- let defaults = { ...Utils.cloneDeep(gridDefaults),
221
+ let defaults = {
222
+ ...Utils.cloneDeep(gridDefaults),
222
223
  column: Utils.toNumber(el.getAttribute('gs-column')) || gridDefaults.column,
223
224
  minRow: rowAttr ? rowAttr : Utils.toNumber(el.getAttribute('gs-min-row')) || gridDefaults.minRow,
224
225
  maxRow: rowAttr ? rowAttr : Utils.toNumber(el.getAttribute('gs-max-row')) || gridDefaults.maxRow,
@@ -313,7 +314,7 @@ class GridStack {
313
314
  this.load(children); // don't load empty
314
315
  }
315
316
  // if (this.engine.nodes.length) this._updateStyles(); // update based on # of children. done in engine onChange CB
316
- this.setAnimation(opts.animate);
317
+ this.setAnimation();
317
318
  // dynamic grids require pausing during drag to detect over to nest vs push
318
319
  if (opts.subGridDynamic && !DDManager.pauseDrag)
319
320
  DDManager.pauseDrag = true;
@@ -585,10 +586,17 @@ class GridStack {
585
586
  load(items, addRemove = GridStack.addRemoveCB || true) {
586
587
  items = Utils.cloneDeep(items); // so we can mod
587
588
  const column = this.getColumn();
589
+ // if we have a mix of new items without coordinates and existing items, separate them out so they can be added after #2639
590
+ let addAfter = items.filter(n => (n.x === undefined || n.y === undefined) && !Utils.find(this.engine.nodes, n.id));
591
+ if (addAfter.length && addAfter.length !== items.length) {
592
+ items = items.filter(n => !Utils.find(addAfter, n.id));
593
+ }
594
+ else
595
+ addAfter = [];
588
596
  // if passed list has coordinates, use them (insert from end to beginning for conflict resolution) else keep widget order
589
597
  const haveCoord = items.some(w => w.x !== undefined || w.y !== undefined);
590
598
  if (haveCoord)
591
- items = Utils.sort(items, -1, column);
599
+ items = Utils.sort(items, -1);
592
600
  this._insertNotAppend = haveCoord; // if we create in reverse order...
593
601
  // if we're loading a layout into for example 1 column and items don't fit, make sure to save
594
602
  // the original wanted layout so we can scale back up correctly #1471
@@ -662,6 +670,10 @@ class GridStack {
662
670
  this.addWidget(w);
663
671
  }
664
672
  });
673
+ // finally append any separate ones that didn't have explicit coordinates last so they can find next empty spot
674
+ if (addRemove) {
675
+ addAfter.forEach(w => this.addWidget(w));
676
+ }
665
677
  this.engine.removedNodes = removed;
666
678
  this.batchUpdate(false);
667
679
  // after commit, clear that flag
@@ -669,8 +681,8 @@ class GridStack {
669
681
  delete this._insertNotAppend;
670
682
  prevCB ? GridStack.addRemoveCB = prevCB : delete GridStack.addRemoveCB;
671
683
  // delay adding animation back
672
- if (noAnim && this.opts.animate)
673
- setTimeout(() => this.setAnimation(this.opts.animate));
684
+ if (noAnim && this.opts?.animate)
685
+ this.setAnimation(this.opts.animate, true);
674
686
  return this;
675
687
  }
676
688
  /**
@@ -1042,7 +1054,7 @@ class GridStack {
1042
1054
  }
1043
1055
  if (!node)
1044
1056
  return;
1045
- if (GridStack.addRemoveCB) {
1057
+ if (removeDOM && GridStack.addRemoveCB) {
1046
1058
  GridStack.addRemoveCB(this.el, node, false, false);
1047
1059
  }
1048
1060
  // remove our DOM data (circular link) and drag&drop permanently
@@ -1062,23 +1074,35 @@ class GridStack {
1062
1074
  /**
1063
1075
  * Removes all widgets from the grid.
1064
1076
  * @param removeDOM if `false` DOM elements won't be removed from the tree (Default? `true`).
1077
+ * @param triggerEvent if `false` (quiet mode) element will not be added to removed list and no 'removed' callbacks will be called (Default? true).
1065
1078
  */
1066
- removeAll(removeDOM = true) {
1079
+ removeAll(removeDOM = true, triggerEvent = true) {
1067
1080
  // always remove our DOM data (circular link) before list gets emptied and drag&drop permanently
1068
1081
  this.engine.nodes.forEach(n => {
1082
+ if (removeDOM && GridStack.addRemoveCB) {
1083
+ GridStack.addRemoveCB(this.el, n, false, false);
1084
+ }
1069
1085
  delete n.el.gridstackNode;
1070
- this._removeDD(n.el);
1086
+ if (!this.opts.staticGrid)
1087
+ this._removeDD(n.el);
1071
1088
  });
1072
- this.engine.removeAll(removeDOM);
1073
- this._triggerRemoveEvent();
1089
+ this.engine.removeAll(removeDOM, triggerEvent);
1090
+ if (triggerEvent)
1091
+ this._triggerRemoveEvent();
1074
1092
  return this;
1075
1093
  }
1076
1094
  /**
1077
1095
  * Toggle the grid animation state. Toggles the `grid-stack-animate` class.
1078
1096
  * @param doAnimate if true the grid will animate.
1097
+ * @param delay if true setting will be set on next event loop.
1079
1098
  */
1080
- setAnimation(doAnimate) {
1081
- if (doAnimate) {
1099
+ setAnimation(doAnimate = this.opts.animate, delay) {
1100
+ if (delay) {
1101
+ // delay, but check to make sure grid (opt) is still around
1102
+ setTimeout(() => { if (this.opts)
1103
+ this.setAnimation(doAnimate); });
1104
+ }
1105
+ else if (doAnimate) {
1082
1106
  this.el.classList.add('grid-stack-animate');
1083
1107
  }
1084
1108
  else {
@@ -1188,12 +1212,15 @@ class GridStack {
1188
1212
  return this;
1189
1213
  }
1190
1214
  moveNode(n, m) {
1191
- this.engine.cleanNodes()
1192
- .beginUpdate(n)
1193
- .moveNode(n, m);
1215
+ const wasUpdating = n._updating;
1216
+ if (!wasUpdating)
1217
+ this.engine.cleanNodes().beginUpdate(n);
1218
+ this.engine.moveNode(n, m);
1194
1219
  this._updateContainerHeight();
1195
- this._triggerChangeEvent();
1196
- this.engine.endUpdate();
1220
+ if (!wasUpdating) {
1221
+ this._triggerChangeEvent();
1222
+ this.engine.endUpdate();
1223
+ }
1197
1224
  }
1198
1225
  /**
1199
1226
  * Updates widget height to match the content height to avoid v-scrollbar or dead space.
@@ -1267,6 +1294,27 @@ class GridStack {
1267
1294
  else
1268
1295
  this.resizeToContent(el);
1269
1296
  }
1297
+ /** rotate (by swapping w & h) the passed in node - called when user press 'r' during dragging
1298
+ * @param els widget or selector of objects to modify
1299
+ * @param relative optional pixel coord relative to upper/left corner to rotate around (will keep that cell under cursor)
1300
+ */
1301
+ rotate(els, relative) {
1302
+ GridStack.getElements(els).forEach(el => {
1303
+ let n = el.gridstackNode;
1304
+ if (!n || n.w === n.h)
1305
+ return;
1306
+ const rot = { w: n.h, h: n.w, minH: n.minW, minW: n.minH, maxH: n.maxW, maxW: n.maxH };
1307
+ // if given an offset, adjust x/y by column/row bounds when user presses 'r' during dragging
1308
+ if (relative) {
1309
+ let pivotX = relative.left > 0 ? Math.floor(relative.left / this.cellWidth()) : 0;
1310
+ let pivotY = relative.top > 0 ? Math.floor(relative.top / this.opts.cellHeight) : 0;
1311
+ rot.x = n.x + pivotX - (n.h - (pivotY + 1));
1312
+ rot.y = (n.y + pivotY) - pivotX;
1313
+ }
1314
+ this.update(el, rot);
1315
+ });
1316
+ return this;
1317
+ }
1270
1318
  /**
1271
1319
  * Updates the margins which will set all 4 sides at once - see `GridStackOptions.margin` for format options (CSS string format of 1,2,4 values or single number).
1272
1320
  * @param value margin value
@@ -1334,8 +1382,9 @@ class GridStack {
1334
1382
  }
1335
1383
  // prevent added nodes from also triggering 'change' event (which is called next)
1336
1384
  this.engine.addedNodes.forEach(n => { delete n._dirty; });
1337
- this._triggerEvent('added', this.engine.addedNodes);
1385
+ const addedNodes = [...this.engine.addedNodes];
1338
1386
  this.engine.addedNodes = [];
1387
+ this._triggerEvent('added', addedNodes);
1339
1388
  }
1340
1389
  return this;
1341
1390
  }
@@ -1344,8 +1393,9 @@ class GridStack {
1344
1393
  if (this.engine.batchMode)
1345
1394
  return this;
1346
1395
  if (this.engine.removedNodes?.length) {
1347
- this._triggerEvent('removed', this.engine.removedNodes);
1396
+ const removedNodes = [...this.engine.removedNodes];
1348
1397
  this.engine.removedNodes = [];
1398
+ this._triggerEvent('removed', removedNodes);
1349
1399
  }
1350
1400
  return this;
1351
1401
  }
@@ -1917,7 +1967,7 @@ class GridStack {
1917
1967
  };
1918
1968
  dd.droppable(this.el, {
1919
1969
  accept: (el) => {
1920
- let node = el.gridstackNode;
1970
+ let node = el.gridstackNode || this._readAttr(el, false);
1921
1971
  // set accept drop to true on ourself (which we ignore) so we don't get "can't drop" icon in HTML5 mode while moving
1922
1972
  if (node?.grid === this)
1923
1973
  return true;
@@ -1932,7 +1982,7 @@ class GridStack {
1932
1982
  let selector = (this.opts.acceptWidgets === true ? '.grid-stack-item' : this.opts.acceptWidgets);
1933
1983
  canAccept = el.matches(selector);
1934
1984
  }
1935
- // finally check to make sure we actually have space left #1571
1985
+ // finally check to make sure we actually have space left #1571 #2633
1936
1986
  if (canAccept && node && this.opts.maxRow) {
1937
1987
  let n = { w: node.w, h: node.h, minW: node.minW, minH: node.minH }; // only width/height matters and autoPosition
1938
1988
  canAccept = this.engine.willItFit(n);
@@ -1994,7 +2044,7 @@ class GridStack {
1994
2044
  node._temporaryRemoved = true; // so we can insert it
1995
2045
  }
1996
2046
  // clear any marked for complete removal (Note: don't check _isAboutToRemove as that is cleared above - just do it)
1997
- this._itemRemoving(node.el, false);
2047
+ GridStack._itemRemoving(node.el, false);
1998
2048
  dd.on(el, 'drag', onDrag);
1999
2049
  // make sure this is called at least once when going fast #1578
2000
2050
  onDrag(event, el, helper);
@@ -2054,7 +2104,7 @@ class GridStack {
2054
2104
  this.engine.cleanupNode(node); // removes all internal _xyz values
2055
2105
  node.grid = this;
2056
2106
  }
2057
- delete node.grid._isTemp;
2107
+ delete node.grid?._isTemp;
2058
2108
  dd.off(el, 'drag');
2059
2109
  // if we made a copy ('helper' which is temp) of the original node then insert a copy, else we move the original node (#1102)
2060
2110
  // as the helper will be nuked by jquery-ui otherwise. TODO: update old code path
@@ -2094,33 +2144,33 @@ class GridStack {
2094
2144
  }
2095
2145
  // delay adding animation back
2096
2146
  if (noAnim)
2097
- setTimeout(() => this.setAnimation(this.opts.animate));
2147
+ this.setAnimation(this.opts.animate, true);
2098
2148
  return false; // prevent parent from receiving msg (which may be grid as well)
2099
2149
  });
2100
2150
  return this;
2101
2151
  }
2102
2152
  /** @internal mark item for removal */
2103
- _itemRemoving(el, remove) {
2104
- let node = el ? el.gridstackNode : undefined;
2105
- if (!node || !node.grid || el.classList.contains(this.opts.removableOptions.decline))
2153
+ static _itemRemoving(el, remove) {
2154
+ const node = el ? el.gridstackNode : undefined;
2155
+ if (!node?.grid || el.classList.contains(node.grid.opts.removableOptions.decline))
2106
2156
  return;
2107
2157
  remove ? node._isAboutToRemove = true : delete node._isAboutToRemove;
2108
2158
  remove ? el.classList.add('grid-stack-item-removing') : el.classList.remove('grid-stack-item-removing');
2109
2159
  }
2110
2160
  /** @internal called to setup a trash drop zone if the user specifies it */
2111
2161
  _setupRemoveDrop() {
2112
- if (!this.opts.staticGrid && typeof this.opts.removable === 'string') {
2113
- let trashEl = document.querySelector(this.opts.removable);
2114
- if (!trashEl)
2115
- return this;
2116
- // only register ONE drop-over/dropout callback for the 'trash', and it will
2117
- // update the passed in item and parent grid because the 'trash' is a shared resource anyway,
2118
- // and Native DD only has 1 event CB (having a list and technically a per grid removableOptions complicates things greatly)
2119
- if (!dd.isDroppable(trashEl)) {
2120
- dd.droppable(trashEl, this.opts.removableOptions)
2121
- .on(trashEl, 'dropover', (event, el) => this._itemRemoving(el, true))
2122
- .on(trashEl, 'dropout', (event, el) => this._itemRemoving(el, false));
2123
- }
2162
+ if (typeof this.opts.removable !== 'string')
2163
+ return this;
2164
+ let trashEl = document.querySelector(this.opts.removable);
2165
+ if (!trashEl)
2166
+ return this;
2167
+ // only register ONE static drop-over/dropout callback for the 'trash', and it will
2168
+ // update the passed in item and parent grid because the '.trash' is a shared resource anyway,
2169
+ // and Native DD only has 1 event CB (having a list and technically a per grid removableOptions complicates things greatly)
2170
+ if (!this.opts.staticGrid && !dd.isDroppable(trashEl)) {
2171
+ dd.droppable(trashEl, this.opts.removableOptions)
2172
+ .on(trashEl, 'dropover', (event, el) => GridStack._itemRemoving(el, true))
2173
+ .on(trashEl, 'dropout', (event, el) => GridStack._itemRemoving(el, false));
2124
2174
  }
2125
2175
  return this;
2126
2176
  }
@@ -2226,6 +2276,7 @@ class GridStack {
2226
2276
  // @ts-ignore
2227
2277
  this._writePosAttr(this.placeholder, node);
2228
2278
  this.el.appendChild(this.placeholder);
2279
+ this.placeholder.gridstackNode = node;
2229
2280
  // console.log('_onStartMoving placeholder') // TEST
2230
2281
  // if the element is inside a grid, it has already been scaled
2231
2282
  // we can use that as a scale reference
@@ -2257,11 +2308,11 @@ class GridStack {
2257
2308
  this.engine.addNode(node); // will add, fix collisions, update attr and clear _temporaryRemoved
2258
2309
  node._moving = true; // AFTER, mark as moving object (wanted fix location before)
2259
2310
  }
2260
- // set the min/max resize info
2311
+ // set the min/max resize info taking into account the column count and position (so we don't resize outside the grid)
2261
2312
  this.engine.cacheRects(cellWidth, cellHeight, this.opts.marginTop, this.opts.marginRight, this.opts.marginBottom, this.opts.marginLeft);
2262
2313
  if (event.type === 'resizestart') {
2263
- dd.resizable(el, 'option', 'minWidth', cellWidth * (node.minW || 1))
2264
- .resizable(el, 'option', 'minHeight', cellHeight * (node.minH || 1));
2314
+ dd.resizable(el, 'option', 'minWidth', cellWidth * Math.min(node.minW || 1, this.getColumn() - node.x))
2315
+ .resizable(el, 'option', 'minHeight', cellHeight * Math.min(node.minH || 1, (this.opts.maxRow || Number.MAX_SAFE_INTEGER) - node.y));
2265
2316
  if (node.maxW) {
2266
2317
  dd.resizable(el, 'option', 'maxWidth', cellWidth * node.maxW);
2267
2318
  }
@@ -2375,7 +2426,7 @@ class GridStack {
2375
2426
  node.el = node._isExternal && helper ? helper : el; // point back to real item being dragged
2376
2427
  if (this.opts.removable === true) { // boolean vs a class string
2377
2428
  // item leaving us and we are supposed to remove on leave (no need to drag onto trash) mark it so
2378
- this._itemRemoving(el, true);
2429
+ GridStack._itemRemoving(el, true);
2379
2430
  }
2380
2431
  // finally if item originally came from another grid, but left us, restore things back to prev info
2381
2432
  if (el._gridstackNodeOrig) {
@@ -2400,6 +2451,6 @@ GridStack.resizeToContentParent = '.grid-stack-item-content';
2400
2451
  GridStack.Utils = Utils;
2401
2452
  /** scoping so users can call new GridStack.Engine(12) for example */
2402
2453
  GridStack.Engine = GridStackEngine;
2403
- GridStack.GDRev = '10.1.1';
2454
+ GridStack.GDRev = '10.2.0';
2404
2455
  export { GridStack };
2405
2456
  //# sourceMappingURL=gridstack.js.map