diff --git a/gridstack.js b/gridstack.js index 7d7c6f0..c256680 100644 --- a/gridstack.js +++ b/gridstack.js @@ -331,7 +331,8 @@ min_width: 768, float: false, _class: 'grid-stack-' + (Math.random() * 10000).toFixed(0), - animate: Boolean(this.container.attr('data-gs-animate')) || false + animate: Boolean(this.container.attr('data-gs-animate')) || false, + always_show_resize_handle: opts.always_show_resize_handle || false }); this.container.addClass(this.opts._class); @@ -524,7 +525,7 @@ self._update_container_height(); } }).resizable({ - autoHide: true, + autoHide: !this.opts.always_show_resize_handle, handles: 'se', minHeight: this.opts.cell_height - 10, minWidth: 70, diff --git a/index.html b/index.html index d442f77..b998b12 100644 --- a/index.html +++ b/index.html @@ -260,7 +260,8 @@ ko.components.register('dashboard-grid', { hljs.initHighlightingOnLoad(); $(function () { $('.grid-stack').gridstack({ - width: 12 + width: 12, + always_show_resize_handle: /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) }); });