Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d038eee

Browse files
committed
update dist
1 parent c413753 commit d038eee

File tree

3 files changed

+19
-14
lines changed

3 files changed

+19
-14
lines changed

dist/gridstack.js

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* gridstack.js 0.2.5-dev
2+
* gridstack.js 0.2.5
33
* http://troolee.github.io/gridstack.js/
44
* (c) 2014-2016 Pavel Reznikov
55
* gridstack.js may be freely distributed under the MIT license.
@@ -99,7 +99,7 @@
9999
var height = val;
100100
var heightUnit = 'px';
101101
if (height && _.isString(height)) {
102-
var match = height.match(/^([0-9]*\.[0-9]+|[0-9]+)(px|em|rem|vh|vw)?$/);
102+
var match = height.match(/^(-[0-9]+\.[0-9]+|[0-9]*\.[0-9]+|-[0-9]+|[0-9]+)(px|em|rem|vh|vw)?$/);
103103
if (!match) {
104104
throw new Error('Invalid height');
105105
}
@@ -367,6 +367,10 @@
367367
return $.extend({}, n);
368368
}));
369369

370+
if (typeof clonedNode === 'undefined') {
371+
return true;
372+
}
373+
370374
clone.moveNode(clonedNode, x, y, width, height);
371375

372376
var res = true;
@@ -477,10 +481,6 @@
477481
opts.placeholderText = opts.placeholder_text;
478482
obsoleteOpts('placeholder_text', 'placeholderText');
479483
}
480-
if (typeof opts.item_class !== 'undefined') {
481-
opts.itemClass = opts.item_class;
482-
obsoleteOpts('item_class', 'itemClass');
483-
}
484484
if (typeof opts.cell_height !== 'undefined') {
485485
opts.cellHeight = opts.cell_height;
486486
obsoleteOpts('cell_height', 'cellHeight');
@@ -541,7 +541,9 @@
541541
disableResize: opts.disableResize || false,
542542
rtl: 'auto',
543543
removable: false,
544-
removeTimeout: 2000
544+
removeTimeout: 2000,
545+
verticalMarginUnit: 'px',
546+
cellHeightUnit: 'px'
545547
});
546548

547549
if (this.opts.rtl === 'auto') {
@@ -1538,10 +1540,13 @@
15381540
this.grid.commit();
15391541
};
15401542

1541-
GridStack.prototype.setGridWidth = function(gridWidth) {
1543+
GridStack.prototype.setGridWidth = function(gridWidth,doNotPropagate) {
15421544
this.container.removeClass('grid-stack-' + this.opts.width);
1543-
this._updateNodeWidths(this.opts.width, gridWidth);
1545+
if (doNotPropagate !== true) {
1546+
this._updateNodeWidths(this.opts.width, gridWidth);
1547+
}
15441548
this.opts.width = gridWidth;
1549+
this.grid.width = gridWidth;
15451550
this.container.addClass('grid-stack-' + gridWidth);
15461551
};
15471552

0 commit comments

Comments
 (0)