improve touch support

This commit is contained in:
Pavel Reznikov 2015-01-08 19:25:04 -08:00
commit cad563efb6
2 changed files with 5 additions and 3 deletions

View file

@ -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,

View file

@ -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)
});
});
</script>