mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Release v0.4.0
This commit is contained in:
21
CHANGELOG.md
21
CHANGELOG.md
@ -1,3 +1,24 @@
|
||||
<a name="v0.4.0"></a>
|
||||
## v0.4.0 (2014-02-07)
|
||||
|
||||
|
||||
#### Bug Fixes
|
||||
|
||||
* **gridster:**
|
||||
* leaking options with multiple Gridster instances ([07c71097](http://github.com/ducksboard/gridster.js/commit/07c7109771094d98be51d68448a20e1d2987b35d))
|
||||
* resize.axes default option only 'both' ([62988780](http://github.com/ducksboard/gridster.js/commit/6298878077d5db129daa9780939fec5237b82af9))
|
||||
* **licenses:** add required copyright message for underscore ([b563c094](http://github.com/ducksboard/gridster.js/commit/b563c094cf0f3a5da2288492f95759ae32e8967c))
|
||||
* **readme:** link title jsfiddle -> jsbin, edit 5) of process steps ([0641aa89](http://github.com/ducksboard/gridster.js/commit/0641aa89833ecf9d167f7d8e89ee8bd5b4304248))
|
||||
|
||||
|
||||
#### Features
|
||||
|
||||
* **draggable:**
|
||||
* method to set drag limits dynamically ([d4482ec1](http://github.com/ducksboard/gridster.js/commit/d4482ec1476f8a0b6fb6cdeb25b7774ef678d81c))
|
||||
* support horizontal scrolling while dragging ([ae4921b7](http://github.com/ducksboard/gridster.js/commit/ae4921b70798944211267cacf8a89e62d0818369))
|
||||
* **gridster:** increase grid width when dragging or resizing ([37c4e943](http://github.com/ducksboard/gridster.js/commit/37c4e94358b9392710452b9e7f96454837bf9845))
|
||||
* **resize:** add option to set min_size of a widget ([ff511872](http://github.com/ducksboard/gridster.js/commit/ff511872e65992ee89bd2a88d862caaf99733f38))
|
||||
|
||||
<a name="v0.3.0"></a>
|
||||
## v0.3.0 (2013-11-18)
|
||||
|
||||
|
4
dist/jquery.gridster.css
vendored
4
dist/jquery.gridster.css
vendored
@ -1,6 +1,6 @@
|
||||
/*! gridster.js - v0.3.0 - 2013-11-19
|
||||
/*! gridster.js - v0.4.0 - 2014-02-07
|
||||
* http://gridster.net/
|
||||
* Copyright (c) 2013 ducksboard; Licensed MIT */
|
||||
* Copyright (c) 2014 ducksboard; Licensed MIT */
|
||||
|
||||
.gridster {
|
||||
position:relative;
|
||||
|
96
dist/jquery.gridster.js
vendored
96
dist/jquery.gridster.js
vendored
@ -1,6 +1,6 @@
|
||||
/*! gridster.js - v0.3.0 - 2013-11-19
|
||||
/*! gridster.js - v0.4.0 - 2014-02-07
|
||||
* http://gridster.net/
|
||||
* Copyright (c) 2013 ducksboard; Licensed MIT */
|
||||
* Copyright (c) 2014 ducksboard; Licensed MIT */
|
||||
|
||||
;(function($, window, document, undefined){
|
||||
/**
|
||||
@ -324,8 +324,33 @@
|
||||
return setTimeout(function(){ return func.apply(null, args); }, wait);
|
||||
};
|
||||
|
||||
|
||||
/* Debounce and throttle functions taken from underscore.js */
|
||||
/* Debounce and throttle functions taken from underscore.js
|
||||
*
|
||||
* Copyright (c) 2009-2013 Jeremy Ashkenas, DocumentCloud and
|
||||
* Investigative Reporters & Editors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person
|
||||
* obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without
|
||||
* restriction, including without limitation the rights to use,
|
||||
* copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following
|
||||
* conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be
|
||||
* included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
window.debounce = function(func, wait, immediate) {
|
||||
var timeout;
|
||||
return function() {
|
||||
@ -340,7 +365,6 @@
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
window.throttle = function(func, wait) {
|
||||
var context, args, timeout, throttling, more, result;
|
||||
var whenDone = debounce(
|
||||
@ -787,7 +811,7 @@
|
||||
},
|
||||
resize: {
|
||||
enabled: false,
|
||||
axes: ['x', 'y', 'both'],
|
||||
axes: ['both'],
|
||||
handle_append_to: '',
|
||||
handle_class: 'gs-resize-handle',
|
||||
max_size: [Infinity, Infinity]
|
||||
@ -852,6 +876,9 @@
|
||||
* @param {Array} [options.resize.max_size] Limit widget dimensions
|
||||
* when resizing. Array values should be integers:
|
||||
* `[max_cols_occupied, max_rows_occupied]`
|
||||
* @param {Array} [options.resize.min_size] Limit widget dimensions
|
||||
* when resizing. Array values should be integers:
|
||||
* `[min_cols_occupied, min_rows_occupied]`
|
||||
* @param {Function} [options.resize.start] Function executed
|
||||
* when resizing starts.
|
||||
* @param {Function} [otions.resize.resize] Function executed
|
||||
@ -862,7 +889,7 @@
|
||||
* @constructor
|
||||
*/
|
||||
function Gridster(el, options) {
|
||||
this.options = $.extend(true, defaults, options);
|
||||
this.options = $.extend(true, {}, defaults, options);
|
||||
this.$el = $(el);
|
||||
this.$wrapper = this.$el.parent();
|
||||
this.$widgets = this.$el.children(
|
||||
@ -962,10 +989,11 @@
|
||||
* @param {Number} [col] The column the widget should start in.
|
||||
* @param {Number} [row] The row the widget should start in.
|
||||
* @param {Array} [max_size] max_size Maximun size (in units) for width and height.
|
||||
* @param {Array} [min_size] min_size Minimum size (in units) for width and height.
|
||||
* @return {HTMLElement} Returns the jQuery wrapped HTMLElement representing.
|
||||
* the widget that was just created.
|
||||
*/
|
||||
fn.add_widget = function(html, size_x, size_y, col, row, max_size) {
|
||||
fn.add_widget = function(html, size_x, size_y, col, row, max_size, min_size) {
|
||||
var pos;
|
||||
size_x || (size_x = 1);
|
||||
size_y || (size_y = 1);
|
||||
@ -999,12 +1027,39 @@
|
||||
this.set_widget_max_size($w, max_size);
|
||||
}
|
||||
|
||||
if (min_size) {
|
||||
this.set_widget_min_size($w, min_size);
|
||||
}
|
||||
|
||||
this.set_dom_grid_height();
|
||||
|
||||
return $w.fadeIn();
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Change widget size limits.
|
||||
*
|
||||
* @method set_widget_min_size
|
||||
* @param {HTMLElement|Number} $widget The jQuery wrapped HTMLElement
|
||||
* representing the widget or an index representing the desired widget.
|
||||
* @param {Array} min_size Minimum size (in units) for width and height.
|
||||
* @return {HTMLElement} Returns instance of gridster Class.
|
||||
*/
|
||||
fn.set_widget_min_size = function($widget, min_size) {
|
||||
$widget = typeof $widget === 'number' ?
|
||||
this.$widgets.eq($widget) : $widget;
|
||||
|
||||
if (!$widget.length) { return this; }
|
||||
|
||||
var wgd = $widget.data('coords').grid;
|
||||
wgd.min_size_x = min_size[0];
|
||||
wgd.min_size_y = min_size[1];
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Change widget size limits.
|
||||
*
|
||||
@ -1432,6 +1487,8 @@
|
||||
'size_y': parseInt($el.attr('data-sizey'), 10),
|
||||
'max_size_x': parseInt($el.attr('data-max-sizex'), 10) || false,
|
||||
'max_size_y': parseInt($el.attr('data-max-sizey'), 10) || false,
|
||||
'min_size_x': parseInt($el.attr('data-min-sizex'), 10) || false,
|
||||
'min_size_y': parseInt($el.attr('data-min-sizey'), 10) || false,
|
||||
'el': $el
|
||||
};
|
||||
|
||||
@ -1812,6 +1869,12 @@
|
||||
this.options.max_cols - this.resize_initial_col + 1);
|
||||
this.resize_max_size_y = this.resize_wgd.max_size_y ||
|
||||
this.options.resize.max_size[1];
|
||||
|
||||
this.resize_min_size_x = (this.resize_wgd.min_size_x ||
|
||||
this.options.resize.min_size[0] || 1);
|
||||
this.resize_min_size_y = (this.resize_wgd.min_size_y ||
|
||||
this.options.resize.min_size[1] || 1);
|
||||
|
||||
this.resize_initial_last_col = this.get_highest_occupied_cell().col;
|
||||
|
||||
this.resize_dir = {
|
||||
@ -1904,14 +1967,17 @@
|
||||
var size_x = Math.max(1, this.resize_initial_sizex + inc_units_x);
|
||||
var size_y = Math.max(1, this.resize_initial_sizey + inc_units_y);
|
||||
|
||||
size_x = Math.min(size_x, this.resize_max_size_x);
|
||||
size_x = Math.max(Math.min(size_x, this.resize_max_size_x), this.resize_min_size_x);
|
||||
max_width = (this.resize_max_size_x * wbd_x) +
|
||||
((size_x - 1) * this.options.widget_margins[0] * 2);
|
||||
min_width = (this.resize_min_size_x * wbd_x) +
|
||||
((size_x - 1) * this.options.widget_margins[0] * 2);
|
||||
|
||||
size_y = Math.min(size_y, this.resize_max_size_y);
|
||||
size_y = Math.max(Math.min(size_y, this.resize_max_size_y), this.resize_min_size_y);
|
||||
max_height = (this.resize_max_size_y * wbd_y) +
|
||||
((size_y - 1) * this.options.widget_margins[1] * 2);
|
||||
|
||||
min_height = (this.resize_min_size_y * wbd_y) +
|
||||
((size_y - 1) * this.options.widget_margins[1] * 2);
|
||||
|
||||
if (this.resize_dir.right) {
|
||||
size_y = this.resize_initial_sizey;
|
||||
@ -1934,10 +2000,10 @@
|
||||
|
||||
|
||||
var css_props = {};
|
||||
!this.resize_dir.bottom && (css_props.width = Math.min(
|
||||
this.resize_initial_width + rel_x, max_width));
|
||||
!this.resize_dir.right && (css_props.height = Math.min(
|
||||
this.resize_initial_height + rel_y, max_height));
|
||||
!this.resize_dir.bottom && (css_props.width = Math.max(Math.min(
|
||||
this.resize_initial_width + rel_x, max_width), min_width));
|
||||
!this.resize_dir.right && (css_props.height = Math.max(Math.min(
|
||||
this.resize_initial_height + rel_y, max_height), min_height));
|
||||
|
||||
this.$resized_widget.css(css_props);
|
||||
|
||||
|
2
dist/jquery.gridster.min.css
vendored
2
dist/jquery.gridster.min.css
vendored
@ -1,2 +1,2 @@
|
||||
/*! gridster.js - v0.3.0 - 2013-11-19 - * http://gridster.net/ - Copyright (c) 2013 ducksboard; Licensed MIT */
|
||||
/*! gridster.js - v0.4.0 - 2014-02-07 - * http://gridster.net/ - Copyright (c) 2014 ducksboard; Licensed MIT */
|
||||
.gridster{position:relative}.gridster>*{margin:0 auto;-webkit-transition:height .4s,width .4s;-moz-transition:height .4s,width .4s;-o-transition:height .4s,width .4s;-ms-transition:height .4s,width .4s;transition:height .4s,width .4s}.gridster .gs-w{z-index:2;position:absolute}.ready .gs-w:not(.preview-holder){-webkit-transition:opacity .3s,left .3s,top .3s;-moz-transition:opacity .3s,left .3s,top .3s;-o-transition:opacity .3s,left .3s,top .3s;transition:opacity .3s,left .3s,top .3s}.ready .gs-w:not(.preview-holder),.ready .resize-preview-holder{-webkit-transition:opacity .3s,left .3s,top .3s,width .3s,height .3s;-moz-transition:opacity .3s,left .3s,top .3s,width .3s,height .3s;-o-transition:opacity .3s,left .3s,top .3s,width .3s,height .3s;transition:opacity .3s,left .3s,top .3s,width .3s,height .3s}.gridster .preview-holder{z-index:1;position:absolute;background-color:#fff;border-color:#fff;opacity:.3}.gridster .player-revert{z-index:10!important;-webkit-transition:left .3s,top .3s!important;-moz-transition:left .3s,top .3s!important;-o-transition:left .3s,top .3s!important;transition:left .3s,top .3s!important}.gridster .dragging,.gridster .resizing{z-index:10!important;-webkit-transition:all 0s!important;-moz-transition:all 0s!important;-o-transition:all 0s!important;transition:all 0s!important}.gs-resize-handle{position:absolute;z-index:1}.gs-resize-handle-both{width:20px;height:20px;bottom:-8px;right:-8px;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/Pg08IS0tIEdlbmVyYXRvcjogQWRvYmUgRmlyZXdvcmtzIENTNiwgRXhwb3J0IFNWRyBFeHRlbnNpb24gYnkgQWFyb24gQmVhbGwgKGh0dHA6Ly9maXJld29ya3MuYWJlYWxsLmNvbSkgLiBWZXJzaW9uOiAwLjYuMSAgLS0+DTwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+DTxzdmcgaWQ9IlVudGl0bGVkLVBhZ2UlMjAxIiB2aWV3Qm94PSIwIDAgNiA2IiBzdHlsZT0iYmFja2dyb3VuZC1jb2xvcjojZmZmZmZmMDAiIHZlcnNpb249IjEuMSINCXhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHhtbDpzcGFjZT0icHJlc2VydmUiDQl4PSIwcHgiIHk9IjBweCIgd2lkdGg9IjZweCIgaGVpZ2h0PSI2cHgiDT4NCTxnIG9wYWNpdHk9IjAuMzAyIj4NCQk8cGF0aCBkPSJNIDYgNiBMIDAgNiBMIDAgNC4yIEwgNCA0LjIgTCA0LjIgNC4yIEwgNC4yIDAgTCA2IDAgTCA2IDYgTCA2IDYgWiIgZmlsbD0iIzAwMDAwMCIvPg0JPC9nPg08L3N2Zz4=);background-position:top left;background-repeat:no-repeat;cursor:se-resize;z-index:20}.gs-resize-handle-x{top:0;bottom:13px;right:-5px;width:10px;cursor:e-resize}.gs-resize-handle-y{left:0;right:13px;bottom:-5px;height:10px;cursor:s-resize}.gs-w:hover .gs-resize-handle,.resizing .gs-resize-handle{opacity:1}.gs-resize-handle,.gs-w.dragging .gs-resize-handle{opacity:0}.gs-resize-disabled .gs-resize-handle{display:none!important}[data-max-sizex="1"] .gs-resize-handle-x,[data-max-sizey="1"] .gs-resize-handle-y,[data-max-sizey="1"][data-max-sizex="1"] .gs-resize-handle{display:none!important}
|
4
dist/jquery.gridster.min.js
vendored
4
dist/jquery.gridster.min.js
vendored
File diff suppressed because one or more lines are too long
96
dist/jquery.gridster.with-extras.js
vendored
96
dist/jquery.gridster.with-extras.js
vendored
@ -1,6 +1,6 @@
|
||||
/*! gridster.js - v0.3.0 - 2013-11-19
|
||||
/*! gridster.js - v0.4.0 - 2014-02-07
|
||||
* http://gridster.net/
|
||||
* Copyright (c) 2013 ducksboard; Licensed MIT */
|
||||
* Copyright (c) 2014 ducksboard; Licensed MIT */
|
||||
|
||||
;(function($, window, document, undefined){
|
||||
/**
|
||||
@ -324,8 +324,33 @@
|
||||
return setTimeout(function(){ return func.apply(null, args); }, wait);
|
||||
};
|
||||
|
||||
|
||||
/* Debounce and throttle functions taken from underscore.js */
|
||||
/* Debounce and throttle functions taken from underscore.js
|
||||
*
|
||||
* Copyright (c) 2009-2013 Jeremy Ashkenas, DocumentCloud and
|
||||
* Investigative Reporters & Editors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person
|
||||
* obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without
|
||||
* restriction, including without limitation the rights to use,
|
||||
* copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following
|
||||
* conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be
|
||||
* included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
window.debounce = function(func, wait, immediate) {
|
||||
var timeout;
|
||||
return function() {
|
||||
@ -340,7 +365,6 @@
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
window.throttle = function(func, wait) {
|
||||
var context, args, timeout, throttling, more, result;
|
||||
var whenDone = debounce(
|
||||
@ -787,7 +811,7 @@
|
||||
},
|
||||
resize: {
|
||||
enabled: false,
|
||||
axes: ['x', 'y', 'both'],
|
||||
axes: ['both'],
|
||||
handle_append_to: '',
|
||||
handle_class: 'gs-resize-handle',
|
||||
max_size: [Infinity, Infinity]
|
||||
@ -852,6 +876,9 @@
|
||||
* @param {Array} [options.resize.max_size] Limit widget dimensions
|
||||
* when resizing. Array values should be integers:
|
||||
* `[max_cols_occupied, max_rows_occupied]`
|
||||
* @param {Array} [options.resize.min_size] Limit widget dimensions
|
||||
* when resizing. Array values should be integers:
|
||||
* `[min_cols_occupied, min_rows_occupied]`
|
||||
* @param {Function} [options.resize.start] Function executed
|
||||
* when resizing starts.
|
||||
* @param {Function} [otions.resize.resize] Function executed
|
||||
@ -862,7 +889,7 @@
|
||||
* @constructor
|
||||
*/
|
||||
function Gridster(el, options) {
|
||||
this.options = $.extend(true, defaults, options);
|
||||
this.options = $.extend(true, {}, defaults, options);
|
||||
this.$el = $(el);
|
||||
this.$wrapper = this.$el.parent();
|
||||
this.$widgets = this.$el.children(
|
||||
@ -962,10 +989,11 @@
|
||||
* @param {Number} [col] The column the widget should start in.
|
||||
* @param {Number} [row] The row the widget should start in.
|
||||
* @param {Array} [max_size] max_size Maximun size (in units) for width and height.
|
||||
* @param {Array} [min_size] min_size Minimum size (in units) for width and height.
|
||||
* @return {HTMLElement} Returns the jQuery wrapped HTMLElement representing.
|
||||
* the widget that was just created.
|
||||
*/
|
||||
fn.add_widget = function(html, size_x, size_y, col, row, max_size) {
|
||||
fn.add_widget = function(html, size_x, size_y, col, row, max_size, min_size) {
|
||||
var pos;
|
||||
size_x || (size_x = 1);
|
||||
size_y || (size_y = 1);
|
||||
@ -999,12 +1027,39 @@
|
||||
this.set_widget_max_size($w, max_size);
|
||||
}
|
||||
|
||||
if (min_size) {
|
||||
this.set_widget_min_size($w, min_size);
|
||||
}
|
||||
|
||||
this.set_dom_grid_height();
|
||||
|
||||
return $w.fadeIn();
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Change widget size limits.
|
||||
*
|
||||
* @method set_widget_min_size
|
||||
* @param {HTMLElement|Number} $widget The jQuery wrapped HTMLElement
|
||||
* representing the widget or an index representing the desired widget.
|
||||
* @param {Array} min_size Minimum size (in units) for width and height.
|
||||
* @return {HTMLElement} Returns instance of gridster Class.
|
||||
*/
|
||||
fn.set_widget_min_size = function($widget, min_size) {
|
||||
$widget = typeof $widget === 'number' ?
|
||||
this.$widgets.eq($widget) : $widget;
|
||||
|
||||
if (!$widget.length) { return this; }
|
||||
|
||||
var wgd = $widget.data('coords').grid;
|
||||
wgd.min_size_x = min_size[0];
|
||||
wgd.min_size_y = min_size[1];
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Change widget size limits.
|
||||
*
|
||||
@ -1432,6 +1487,8 @@
|
||||
'size_y': parseInt($el.attr('data-sizey'), 10),
|
||||
'max_size_x': parseInt($el.attr('data-max-sizex'), 10) || false,
|
||||
'max_size_y': parseInt($el.attr('data-max-sizey'), 10) || false,
|
||||
'min_size_x': parseInt($el.attr('data-min-sizex'), 10) || false,
|
||||
'min_size_y': parseInt($el.attr('data-min-sizey'), 10) || false,
|
||||
'el': $el
|
||||
};
|
||||
|
||||
@ -1812,6 +1869,12 @@
|
||||
this.options.max_cols - this.resize_initial_col + 1);
|
||||
this.resize_max_size_y = this.resize_wgd.max_size_y ||
|
||||
this.options.resize.max_size[1];
|
||||
|
||||
this.resize_min_size_x = (this.resize_wgd.min_size_x ||
|
||||
this.options.resize.min_size[0] || 1);
|
||||
this.resize_min_size_y = (this.resize_wgd.min_size_y ||
|
||||
this.options.resize.min_size[1] || 1);
|
||||
|
||||
this.resize_initial_last_col = this.get_highest_occupied_cell().col;
|
||||
|
||||
this.resize_dir = {
|
||||
@ -1904,14 +1967,17 @@
|
||||
var size_x = Math.max(1, this.resize_initial_sizex + inc_units_x);
|
||||
var size_y = Math.max(1, this.resize_initial_sizey + inc_units_y);
|
||||
|
||||
size_x = Math.min(size_x, this.resize_max_size_x);
|
||||
size_x = Math.max(Math.min(size_x, this.resize_max_size_x), this.resize_min_size_x);
|
||||
max_width = (this.resize_max_size_x * wbd_x) +
|
||||
((size_x - 1) * this.options.widget_margins[0] * 2);
|
||||
min_width = (this.resize_min_size_x * wbd_x) +
|
||||
((size_x - 1) * this.options.widget_margins[0] * 2);
|
||||
|
||||
size_y = Math.min(size_y, this.resize_max_size_y);
|
||||
size_y = Math.max(Math.min(size_y, this.resize_max_size_y), this.resize_min_size_y);
|
||||
max_height = (this.resize_max_size_y * wbd_y) +
|
||||
((size_y - 1) * this.options.widget_margins[1] * 2);
|
||||
|
||||
min_height = (this.resize_min_size_y * wbd_y) +
|
||||
((size_y - 1) * this.options.widget_margins[1] * 2);
|
||||
|
||||
if (this.resize_dir.right) {
|
||||
size_y = this.resize_initial_sizey;
|
||||
@ -1934,10 +2000,10 @@
|
||||
|
||||
|
||||
var css_props = {};
|
||||
!this.resize_dir.bottom && (css_props.width = Math.min(
|
||||
this.resize_initial_width + rel_x, max_width));
|
||||
!this.resize_dir.right && (css_props.height = Math.min(
|
||||
this.resize_initial_height + rel_y, max_height));
|
||||
!this.resize_dir.bottom && (css_props.width = Math.max(Math.min(
|
||||
this.resize_initial_width + rel_x, max_width), min_width));
|
||||
!this.resize_dir.right && (css_props.height = Math.max(Math.min(
|
||||
this.resize_initial_height + rel_y, max_height), min_height));
|
||||
|
||||
this.$resized_widget.css(css_props);
|
||||
|
||||
|
4
dist/jquery.gridster.with-extras.min.js
vendored
4
dist/jquery.gridster.with-extras.min.js
vendored
File diff suppressed because one or more lines are too long
@ -2,7 +2,7 @@
|
||||
"name": "gridster",
|
||||
"title": "gridster.js",
|
||||
"description": "a drag-and-drop multi-column jQuery grid plugin",
|
||||
"version": "0.3.0",
|
||||
"version": "0.4.0",
|
||||
"homepage": "http://gridster.net/",
|
||||
"author": {
|
||||
"name": "ducksboard",
|
||||
|
Reference in New Issue
Block a user