add maxWidth/maxHeight
This commit is contained in:
parent
29857f4131
commit
02f0eba64d
5 changed files with 93 additions and 8 deletions
|
|
@ -991,6 +991,23 @@
|
|||
return this;
|
||||
};
|
||||
|
||||
GridStack.prototype.maxHeight = function(el, val) {
|
||||
el = $(el);
|
||||
el.each(function(index, el) {
|
||||
el = $(el);
|
||||
var node = el.data('_gridstack_node');
|
||||
if (typeof node == 'undefined' || node == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!isNaN(val)) {
|
||||
node.maxHeight = (val || false);
|
||||
el.attr('data-gs-max-height', val);
|
||||
}
|
||||
});
|
||||
return this;
|
||||
};
|
||||
|
||||
GridStack.prototype.minHeight = function(el, val) {
|
||||
el = $(el);
|
||||
el.each(function(index, el) {
|
||||
|
|
@ -1008,6 +1025,23 @@
|
|||
return this;
|
||||
};
|
||||
|
||||
GridStack.prototype.maxWidth = function(el, val) {
|
||||
el = $(el);
|
||||
el.each(function(index, el) {
|
||||
el = $(el);
|
||||
var node = el.data('_gridstack_node');
|
||||
if (typeof node == 'undefined' || node == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!isNaN(val)) {
|
||||
node.maxWidth = (val || false);
|
||||
el.attr('data-gs-max-width', val);
|
||||
}
|
||||
});
|
||||
return this;
|
||||
};
|
||||
|
||||
GridStack.prototype.minWidth = function(el, val) {
|
||||
el = $(el);
|
||||
el.each(function(index, el) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue