gridstack 9.1.0 → 9.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.
- package/angular/projects/lib/package.json +1 -1
- package/angular/projects/lib/src/lib/base-widget.ts +1 -1
- package/angular/projects/lib/src/lib/gridstack-item.component.ts +1 -1
- package/angular/projects/lib/src/lib/gridstack.component.ts +1 -1
- package/angular/projects/lib/src/lib/gridstack.module.ts +1 -1
- package/dist/angular/esm2020/lib/base-widget.mjs +2 -2
- package/dist/angular/esm2020/lib/gridstack-item.component.mjs +2 -2
- package/dist/angular/esm2020/lib/gridstack.component.mjs +2 -2
- package/dist/angular/esm2020/lib/gridstack.module.mjs +2 -2
- package/dist/angular/fesm2015/gridstack-angular.mjs +4 -4
- package/dist/angular/fesm2015/gridstack-angular.mjs.map +1 -1
- package/dist/angular/fesm2020/gridstack-angular.mjs +4 -4
- package/dist/angular/fesm2020/gridstack-angular.mjs.map +1 -1
- package/dist/angular/lib/gridstack-item.component.d.ts +1 -1
- package/dist/angular/lib/gridstack.component.d.ts +1 -1
- package/dist/angular/package.json +1 -1
- package/dist/angular/src/base-widget.ts +1 -1
- package/dist/angular/src/gridstack-item.component.ts +1 -1
- package/dist/angular/src/gridstack.component.ts +1 -1
- package/dist/angular/src/gridstack.module.ts +1 -1
- package/dist/dd-base-impl.d.ts +1 -1
- package/dist/dd-base-impl.js +1 -1
- package/dist/dd-base-impl.js.map +1 -1
- package/dist/dd-draggable.d.ts +1 -1
- package/dist/dd-draggable.js +2 -2
- package/dist/dd-draggable.js.map +1 -1
- package/dist/dd-droppable.d.ts +1 -1
- package/dist/dd-droppable.js +1 -1
- package/dist/dd-droppable.js.map +1 -1
- package/dist/dd-element.d.ts +1 -1
- package/dist/dd-element.js +1 -1
- package/dist/dd-element.js.map +1 -1
- package/dist/dd-gridstack.d.ts +1 -1
- package/dist/dd-gridstack.js +1 -1
- package/dist/dd-gridstack.js.map +1 -1
- package/dist/dd-manager.d.ts +1 -1
- package/dist/dd-manager.js +1 -1
- package/dist/dd-manager.js.map +1 -1
- package/dist/dd-resizable-handle.d.ts +1 -1
- package/dist/dd-resizable-handle.js +1 -1
- package/dist/dd-resizable-handle.js.map +1 -1
- package/dist/dd-resizable.d.ts +1 -1
- package/dist/dd-resizable.js +2 -2
- package/dist/dd-resizable.js.map +1 -1
- package/dist/dd-touch.d.ts +1 -1
- package/dist/dd-touch.js +1 -1
- package/dist/dd-touch.js.map +1 -1
- package/dist/es5/dd-base-impl.d.ts +1 -1
- package/dist/es5/dd-base-impl.js +1 -1
- package/dist/es5/dd-base-impl.js.map +1 -1
- package/dist/es5/dd-draggable.d.ts +1 -1
- package/dist/es5/dd-draggable.js +2 -2
- package/dist/es5/dd-draggable.js.map +1 -1
- package/dist/es5/dd-droppable.d.ts +1 -1
- package/dist/es5/dd-droppable.js +1 -1
- package/dist/es5/dd-droppable.js.map +1 -1
- package/dist/es5/dd-element.d.ts +1 -1
- package/dist/es5/dd-element.js +1 -1
- package/dist/es5/dd-element.js.map +1 -1
- package/dist/es5/dd-gridstack.d.ts +1 -1
- package/dist/es5/dd-gridstack.js +1 -1
- package/dist/es5/dd-gridstack.js.map +1 -1
- package/dist/es5/dd-manager.d.ts +1 -1
- package/dist/es5/dd-manager.js +1 -1
- package/dist/es5/dd-manager.js.map +1 -1
- package/dist/es5/dd-resizable-handle.d.ts +1 -1
- package/dist/es5/dd-resizable-handle.js +1 -1
- package/dist/es5/dd-resizable-handle.js.map +1 -1
- package/dist/es5/dd-resizable.d.ts +1 -1
- package/dist/es5/dd-resizable.js +2 -2
- package/dist/es5/dd-resizable.js.map +1 -1
- package/dist/es5/dd-touch.d.ts +1 -1
- package/dist/es5/dd-touch.js +1 -1
- package/dist/es5/dd-touch.js.map +1 -1
- package/dist/es5/gridstack-all.js +1 -1
- package/dist/es5/gridstack-all.js.LICENSE.txt +1 -1
- package/dist/es5/gridstack-all.js.map +1 -1
- package/dist/es5/gridstack-engine.d.ts +1 -1
- package/dist/es5/gridstack-engine.js +6 -4
- package/dist/es5/gridstack-engine.js.map +1 -1
- package/dist/es5/gridstack-poly.js +1 -1
- package/dist/es5/gridstack.d.ts +12 -8
- package/dist/es5/gridstack.js +97 -80
- package/dist/es5/gridstack.js.map +1 -1
- package/dist/es5/types.d.ts +7 -7
- package/dist/es5/types.js +1 -1
- package/dist/es5/types.js.map +1 -1
- package/dist/es5/utils.d.ts +1 -1
- package/dist/es5/utils.js +2 -2
- package/dist/es5/utils.js.map +1 -1
- package/dist/gridstack-all.js +1 -1
- package/dist/gridstack-all.js.LICENSE.txt +1 -1
- package/dist/gridstack-all.js.map +1 -1
- package/dist/gridstack-engine.d.ts +1 -1
- package/dist/gridstack-engine.js +6 -4
- package/dist/gridstack-engine.js.map +1 -1
- package/dist/gridstack.css +2 -2
- package/dist/gridstack.d.ts +12 -8
- package/dist/gridstack.js +94 -79
- package/dist/gridstack.js.map +1 -1
- package/dist/gridstack.min.css +1 -1
- package/dist/src/gridstack.scss +2 -2
- package/dist/types.d.ts +7 -7
- package/dist/types.js +1 -1
- package/dist/types.js.map +1 -1
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +2 -2
- package/dist/utils.js.map +1 -1
- package/doc/CHANGES.md +10 -0
- package/package.json +1 -1
package/dist/es5/gridstack.js
CHANGED
|
@@ -36,7 +36,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
36
36
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
37
|
exports.GridStack = void 0;
|
|
38
38
|
/*!
|
|
39
|
-
* GridStack 9.
|
|
39
|
+
* GridStack 9.2.0
|
|
40
40
|
* https://gridstackjs.com/
|
|
41
41
|
*
|
|
42
42
|
* Copyright (c) 2021-2022 Alain Dumesny
|
|
@@ -590,7 +590,7 @@ var GridStack = exports.GridStack = /** @class */ (function () {
|
|
|
590
590
|
*
|
|
591
591
|
* @example
|
|
592
592
|
* see http://gridstackjs.com/demo/serialization.html
|
|
593
|
-
|
|
593
|
+
*/
|
|
594
594
|
GridStack.prototype.load = function (layout, addRemove) {
|
|
595
595
|
var _this = this;
|
|
596
596
|
if (addRemove === void 0) { addRemove = GridStack.addRemoveCB || true; }
|
|
@@ -730,7 +730,7 @@ var GridStack = exports.GridStack = /** @class */ (function () {
|
|
|
730
730
|
}
|
|
731
731
|
this.opts.cellHeightUnit = data.unit;
|
|
732
732
|
this.opts.cellHeight = data.h;
|
|
733
|
-
this.doContentResize(false);
|
|
733
|
+
this.doContentResize(false, true); // no anim wait, but use attributes since we only change row height
|
|
734
734
|
if (update) {
|
|
735
735
|
this._updateStyles(true); // true = force re-create for current # of rows
|
|
736
736
|
}
|
|
@@ -752,7 +752,7 @@ var GridStack = exports.GridStack = /** @class */ (function () {
|
|
|
752
752
|
* 'compact' might re-order items to fill any empty space
|
|
753
753
|
*
|
|
754
754
|
* doSort - 'false' to let you do your own sorting ahead in case you need to control a different order. (default to sort)
|
|
755
|
-
|
|
755
|
+
*/
|
|
756
756
|
GridStack.prototype.compact = function (layout, doSort) {
|
|
757
757
|
if (layout === void 0) { layout = 'compact'; }
|
|
758
758
|
if (doSort === void 0) { doSort = true; }
|
|
@@ -928,7 +928,7 @@ var GridStack = exports.GridStack = /** @class */ (function () {
|
|
|
928
928
|
this._prepareElement(el, true, options);
|
|
929
929
|
var node = el.gridstackNode;
|
|
930
930
|
this._updateContainerHeight();
|
|
931
|
-
this.doContentResize(false, node);
|
|
931
|
+
this.doContentResize(false, false, node);
|
|
932
932
|
// see if there is a sub-grid to create
|
|
933
933
|
if (node.subGridOpts) {
|
|
934
934
|
this.makeSubGrid(el, node.subGridOpts, undefined, false); // node.subGrid will be used as option in method, no need to pass
|
|
@@ -1189,72 +1189,78 @@ var GridStack = exports.GridStack = /** @class */ (function () {
|
|
|
1189
1189
|
this._triggerChangeEvent();
|
|
1190
1190
|
this.engine.endUpdate();
|
|
1191
1191
|
};
|
|
1192
|
-
/**
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1192
|
+
/**
|
|
1193
|
+
* Updates widget height to match the content height to avoid v-scrollbar or dead space.
|
|
1194
|
+
* Note: this assumes only 1 child under resizeToContentParent='.grid-stack-item-content' (sized to gridItem minus padding) that is at the entire content size wanted.
|
|
1195
|
+
* useAttrSize set to true if GridStackNode.h should be used instead of actual container height when we don't need to wait for animation to finish to get actual DOM heights
|
|
1196
|
+
*/
|
|
1197
|
+
GridStack.prototype.resizeToContent = function (el, useAttrSize) {
|
|
1198
|
+
if (useAttrSize === void 0) { useAttrSize = false; }
|
|
1199
|
+
el === null || el === void 0 ? void 0 : el.classList.remove('size-to-content-max');
|
|
1200
|
+
if (!(el === null || el === void 0 ? void 0 : el.clientHeight))
|
|
1201
|
+
return; // 0 when hidden, skip
|
|
1202
|
+
var n = el.gridstackNode;
|
|
1203
|
+
if (!n)
|
|
1204
|
+
return;
|
|
1205
|
+
var grid = n.grid;
|
|
1206
|
+
if (!grid)
|
|
1207
|
+
return;
|
|
1208
|
+
if (el.parentElement !== grid.el)
|
|
1209
|
+
return; // skip if we are not inside a grid
|
|
1210
|
+
var cell = grid.getCellHeight();
|
|
1211
|
+
if (!cell)
|
|
1212
|
+
return;
|
|
1213
|
+
var height = useAttrSize && n.h ? n.h * cell : el.clientHeight; // getBoundingClientRect().height seem to flicker back and forth
|
|
1214
|
+
var item;
|
|
1215
|
+
if (n.resizeToContentParent)
|
|
1216
|
+
item = el.querySelector(n.resizeToContentParent);
|
|
1217
|
+
if (!item)
|
|
1218
|
+
item = el.querySelector(GridStack.resizeToContentParent);
|
|
1219
|
+
if (!item)
|
|
1220
|
+
return;
|
|
1221
|
+
var padding = el.clientHeight - item.clientHeight; // full - available height to our child (minus border, padding...)
|
|
1222
|
+
var itemH = useAttrSize && n.h ? n.h * cell - padding : item.clientHeight; // calculated to what cellHeight is or will become (rather than actual to prevent waiting for animation to finish)
|
|
1223
|
+
var wantedH;
|
|
1224
|
+
if (n.subGrid) {
|
|
1225
|
+
// sub-grid - use their actual row count * their cell height
|
|
1226
|
+
wantedH = n.subGrid.getRow() * n.subGrid.getCellHeight();
|
|
1227
|
+
}
|
|
1228
|
+
else {
|
|
1219
1229
|
// NOTE: clientHeight & getBoundingClientRect() is undefined for text and other leaf nodes. use <div> container!
|
|
1230
|
+
var child = item.firstElementChild;
|
|
1220
1231
|
if (!child) {
|
|
1221
1232
|
console.log("Error: resizeToContent() '".concat(GridStack.resizeToContentParent, "'.firstElementChild is null, make sure to have a div like container. Skipping sizing."));
|
|
1222
1233
|
return;
|
|
1223
1234
|
}
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
if (h !== n.h) {
|
|
1246
|
-
_this._ignoreLayoutsNodeChange = true;
|
|
1247
|
-
_this.moveNode(n, { h: h });
|
|
1248
|
-
delete _this._ignoreLayoutsNodeChange;
|
|
1249
|
-
}
|
|
1250
|
-
});
|
|
1235
|
+
wantedH = child.getBoundingClientRect().height || itemH;
|
|
1236
|
+
}
|
|
1237
|
+
if (itemH === wantedH)
|
|
1238
|
+
return;
|
|
1239
|
+
height += wantedH - itemH;
|
|
1240
|
+
var h = Math.ceil(height / cell);
|
|
1241
|
+
// check for min/max and special sizing
|
|
1242
|
+
var softMax = Number.isInteger(n.sizeToContent) ? n.sizeToContent : 0;
|
|
1243
|
+
if (softMax && h > softMax) {
|
|
1244
|
+
h = softMax;
|
|
1245
|
+
el.classList.add('size-to-content-max'); // get v-scroll back
|
|
1246
|
+
}
|
|
1247
|
+
if (n.minH && h < n.minH)
|
|
1248
|
+
h = n.minH;
|
|
1249
|
+
else if (n.maxH && h > n.maxH)
|
|
1250
|
+
h = n.maxH;
|
|
1251
|
+
if (h !== n.h) {
|
|
1252
|
+
grid._ignoreLayoutsNodeChange = true;
|
|
1253
|
+
grid.moveNode(n, { h: h });
|
|
1254
|
+
delete grid._ignoreLayoutsNodeChange;
|
|
1255
|
+
}
|
|
1251
1256
|
};
|
|
1252
1257
|
/** call the user resize (so we can do extra work) else our build in version */
|
|
1253
|
-
GridStack.prototype.resizeToContentCheck = function (el) {
|
|
1258
|
+
GridStack.prototype.resizeToContentCheck = function (el, useAttr) {
|
|
1259
|
+
if (useAttr === void 0) { useAttr = false; }
|
|
1254
1260
|
if (GridStack.resizeToContentCB)
|
|
1255
1261
|
GridStack.resizeToContentCB(el);
|
|
1256
1262
|
else
|
|
1257
|
-
this.resizeToContent(el);
|
|
1263
|
+
this.resizeToContent(el, useAttr);
|
|
1258
1264
|
};
|
|
1259
1265
|
/**
|
|
1260
1266
|
* 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).
|
|
@@ -1430,13 +1436,18 @@ var GridStack = exports.GridStack = /** @class */ (function () {
|
|
|
1430
1436
|
this.el.setAttribute('gs-current-row', String(row));
|
|
1431
1437
|
if (row === 0) {
|
|
1432
1438
|
this.el.style.removeProperty('min-height');
|
|
1433
|
-
return this;
|
|
1434
1439
|
}
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
+
else {
|
|
1441
|
+
var cellHeight = this.opts.cellHeight;
|
|
1442
|
+
var unit = this.opts.cellHeightUnit;
|
|
1443
|
+
if (!cellHeight)
|
|
1444
|
+
return this;
|
|
1445
|
+
this.el.style.minHeight = row * cellHeight + unit;
|
|
1446
|
+
}
|
|
1447
|
+
// if we're a nested grid inside an sizeToContent item, tell it to resize itself too
|
|
1448
|
+
if (this.parentGridItem && !this.parentGridItem.grid.engine.batchMode && utils_1.Utils.shouldSizeToContent(this.parentGridItem)) {
|
|
1449
|
+
this.parentGridItem.grid.resizeToContentCheck(this.parentGridItem.el);
|
|
1450
|
+
}
|
|
1440
1451
|
return this;
|
|
1441
1452
|
};
|
|
1442
1453
|
/** @internal */
|
|
@@ -1590,30 +1601,34 @@ var GridStack = exports.GridStack = /** @class */ (function () {
|
|
|
1590
1601
|
if (n.subGrid)
|
|
1591
1602
|
n.subGrid.onResize();
|
|
1592
1603
|
});
|
|
1593
|
-
this.
|
|
1604
|
+
if (!this._skipInitialResize)
|
|
1605
|
+
this.doContentResize(columnChanged); // wait for anim of column changed (DOM reflow before we can size correctly)
|
|
1606
|
+
delete this._skipInitialResize;
|
|
1594
1607
|
this.batchUpdate(false);
|
|
1595
1608
|
return this;
|
|
1596
1609
|
};
|
|
1597
|
-
GridStack.prototype.doContentResize = function (delay, n) {
|
|
1610
|
+
GridStack.prototype.doContentResize = function (delay, useAttr, n) {
|
|
1598
1611
|
var _this = this;
|
|
1599
1612
|
if (delay === void 0) { delay = true; }
|
|
1613
|
+
if (useAttr === void 0) { useAttr = false; }
|
|
1600
1614
|
if (n === void 0) { n = undefined; }
|
|
1601
1615
|
// update any gridItem height with sizeToContent, but wait for DOM $animation_speed to settle if we changed column count
|
|
1602
1616
|
// TODO: is there a way to know what the final (post animation) size of the content will be so we can animate the column width and height together rather than sequentially ?
|
|
1603
1617
|
setTimeout(function () {
|
|
1604
1618
|
if (n) {
|
|
1605
1619
|
if (utils_1.Utils.shouldSizeToContent(n))
|
|
1606
|
-
_this.resizeToContentCheck(n.el);
|
|
1620
|
+
_this.resizeToContentCheck(n.el, useAttr);
|
|
1607
1621
|
}
|
|
1608
|
-
else {
|
|
1622
|
+
else if (_this.engine.nodes.some(function (n) { return utils_1.Utils.shouldSizeToContent(n); })) {
|
|
1609
1623
|
var nodes = __spreadArray([], _this.engine.nodes, true); // in case order changes while resizing one
|
|
1610
1624
|
_this.batchUpdate();
|
|
1611
1625
|
nodes.forEach(function (n) {
|
|
1612
1626
|
if (utils_1.Utils.shouldSizeToContent(n))
|
|
1613
|
-
_this.resizeToContentCheck(n.el);
|
|
1627
|
+
_this.resizeToContentCheck(n.el, useAttr);
|
|
1614
1628
|
});
|
|
1615
1629
|
_this.batchUpdate(false);
|
|
1616
1630
|
}
|
|
1631
|
+
// call this regardless of shouldSizeToContent because widget might need to stretch to take available space after a resize
|
|
1617
1632
|
if (_this._gsEventHandler['resizecontent'])
|
|
1618
1633
|
_this._gsEventHandler['resizecontent'](null, n ? [n] : _this.engine.nodes);
|
|
1619
1634
|
}, delay ? 300 + 10 : 0);
|
|
@@ -1624,11 +1639,13 @@ var GridStack = exports.GridStack = /** @class */ (function () {
|
|
|
1624
1639
|
if (forceRemove === void 0) { forceRemove = false; }
|
|
1625
1640
|
// only add event if we're not nested (parent will call us) and we're auto sizing cells or supporting oneColumn (i.e. doing work)
|
|
1626
1641
|
// or supporting new sizeToContent option.
|
|
1627
|
-
var trackSize = !this.parentGridItem && (this._isAutoCellHeight || this.opts.sizeToContent || !this.opts.disableOneColumnMode
|
|
1642
|
+
var trackSize = !this.parentGridItem && (this._isAutoCellHeight || this.opts.sizeToContent || !this.opts.disableOneColumnMode
|
|
1643
|
+
|| this.engine.nodes.find(function (n) { return n.sizeToContent; }));
|
|
1628
1644
|
if (!forceRemove && trackSize && !this.resizeObserver) {
|
|
1629
1645
|
this._sizeThrottle = utils_1.Utils.throttle(function () { return _this.onResize(); }, this.opts.cellHeightThrottle);
|
|
1630
1646
|
this.resizeObserver = new ResizeObserver(function (entries) { return _this._sizeThrottle(); });
|
|
1631
1647
|
this.resizeObserver.observe(this.el);
|
|
1648
|
+
this._skipInitialResize = true; // makeWidget will originally have called on startup
|
|
1632
1649
|
}
|
|
1633
1650
|
else if ((forceRemove || !trackSize) && this.resizeObserver) {
|
|
1634
1651
|
this.resizeObserver.disconnect();
|
|
@@ -1730,7 +1747,7 @@ var GridStack = exports.GridStack = /** @class */ (function () {
|
|
|
1730
1747
|
* @param dragIn string selector (ex: '.sidebar .grid-stack-item') or list of dom elements
|
|
1731
1748
|
* @param dragInOptions options - see DDDragInOpt. (default: {handle: '.grid-stack-item-content', appendTo: 'body'}
|
|
1732
1749
|
* @param root optional root which defaults to document (for shadow dom pas the parent HTMLDocument)
|
|
1733
|
-
|
|
1750
|
+
*/
|
|
1734
1751
|
GridStack.setupDragIn = function (dragIn, dragInOptions, root) {
|
|
1735
1752
|
if (root === void 0) { root = document; }
|
|
1736
1753
|
if ((dragInOptions === null || dragInOptions === void 0 ? void 0 : dragInOptions.pause) !== undefined) {
|
|
@@ -2120,7 +2137,7 @@ var GridStack = exports.GridStack = /** @class */ (function () {
|
|
|
2120
2137
|
}
|
|
2121
2138
|
return this;
|
|
2122
2139
|
};
|
|
2123
|
-
/** @internal prepares the element for drag&drop
|
|
2140
|
+
/** @internal prepares the element for drag&drop */
|
|
2124
2141
|
GridStack.prototype._prepareDragDropByNode = function (node) {
|
|
2125
2142
|
var _this = this;
|
|
2126
2143
|
var el = node.el;
|
|
@@ -2196,7 +2213,7 @@ var GridStack = exports.GridStack = /** @class */ (function () {
|
|
|
2196
2213
|
if (event.type === 'resizestop') {
|
|
2197
2214
|
if (Number.isInteger(node.sizeToContent))
|
|
2198
2215
|
node.sizeToContent = node.h; // new soft limit
|
|
2199
|
-
_this.doContentResize(false, node);
|
|
2216
|
+
_this.doContentResize(false, true, node); // no amin wait as will use the actual sized coordinate attr
|
|
2200
2217
|
}
|
|
2201
2218
|
};
|
|
2202
2219
|
dd.draggable(el, {
|
|
@@ -2215,7 +2232,7 @@ var GridStack = exports.GridStack = /** @class */ (function () {
|
|
|
2215
2232
|
.resizable(el, noResize ? 'disable' : 'enable');
|
|
2216
2233
|
return this;
|
|
2217
2234
|
};
|
|
2218
|
-
/** @internal handles actual drag/resize start
|
|
2235
|
+
/** @internal handles actual drag/resize start */
|
|
2219
2236
|
GridStack.prototype._onStartMoving = function (el, event, ui, node, cellWidth, cellHeight) {
|
|
2220
2237
|
this.engine.cleanNodes()
|
|
2221
2238
|
.beginUpdate(node);
|
|
@@ -2246,7 +2263,7 @@ var GridStack = exports.GridStack = /** @class */ (function () {
|
|
|
2246
2263
|
}
|
|
2247
2264
|
}
|
|
2248
2265
|
};
|
|
2249
|
-
/** @internal handles actual drag/resize
|
|
2266
|
+
/** @internal handles actual drag/resize */
|
|
2250
2267
|
GridStack.prototype._dragOrResize = function (el, event, ui, node, cellWidth, cellHeight) {
|
|
2251
2268
|
var p = __assign({}, node._orig); // could be undefined (_isExternal) which is ok (drag only set x,y and w,h will default to node value)
|
|
2252
2269
|
var resizing;
|
|
@@ -2334,7 +2351,7 @@ var GridStack = exports.GridStack = /** @class */ (function () {
|
|
|
2334
2351
|
/** @internal called when item leaving our area by either cursor dropout event
|
|
2335
2352
|
* or shape is outside our boundaries. remove it from us, and mark temporary if this was
|
|
2336
2353
|
* our item to start with else restore prev node values from prev grid it came from.
|
|
2337
|
-
|
|
2354
|
+
*/
|
|
2338
2355
|
GridStack.prototype._leave = function (el, helper) {
|
|
2339
2356
|
var node = el.gridstackNode;
|
|
2340
2357
|
if (!node)
|
|
@@ -2372,7 +2389,7 @@ var GridStack = exports.GridStack = /** @class */ (function () {
|
|
|
2372
2389
|
GridStack.Utils = utils_1.Utils;
|
|
2373
2390
|
/** scoping so users can call new GridStack.Engine(12) for example */
|
|
2374
2391
|
GridStack.Engine = gridstack_engine_1.GridStackEngine;
|
|
2375
|
-
GridStack.GDRev = '9.
|
|
2392
|
+
GridStack.GDRev = '9.2.0';
|
|
2376
2393
|
return GridStack;
|
|
2377
2394
|
}());
|
|
2378
2395
|
//# sourceMappingURL=gridstack.js.map
|