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

Skip to content

Commit a738ee8

Browse files
committed
update dist with min_width/min_height
1 parent 177ddc1 commit a738ee8

File tree

3 files changed

+36
-2
lines changed

3 files changed

+36
-2
lines changed

dist/gridstack.js

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -797,6 +797,40 @@
797797
return this;
798798
};
799799

800+
GridStack.prototype.min_height = function (el, val) {
801+
el = $(el);
802+
el.each(function (index, el) {
803+
el = $(el);
804+
var node = el.data('_gridstack_node');
805+
if (typeof node == 'undefined' || node == null) {
806+
return;
807+
}
808+
809+
if(!isNaN(val)){
810+
node.min_height = (val || false);
811+
el.attr('data-gs-min-height', val);
812+
}
813+
});
814+
return this;
815+
};
816+
817+
GridStack.prototype.min_width = function (el, val) {
818+
el = $(el);
819+
el.each(function (index, el) {
820+
el = $(el);
821+
var node = el.data('_gridstack_node');
822+
if (typeof node == 'undefined' || node == null) {
823+
return;
824+
}
825+
826+
if(!isNaN(val)){
827+
node.min_width = (val || false);
828+
el.attr('data-gs-min-width', val);
829+
}
830+
});
831+
return this;
832+
};
833+
800834
GridStack.prototype._update_element = function(el, callback) {
801835
el = $(el).first();
802836
var node = el.data('_gridstack_node');

0 commit comments

Comments
 (0)