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

Skip to content

Commit cad563e

Browse files
committed
improve touch support
1 parent bd2fc8e commit cad563e

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

gridstack.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,8 @@
331331
min_width: 768,
332332
float: false,
333333
_class: 'grid-stack-' + (Math.random() * 10000).toFixed(0),
334-
animate: Boolean(this.container.attr('data-gs-animate')) || false
334+
animate: Boolean(this.container.attr('data-gs-animate')) || false,
335+
always_show_resize_handle: opts.always_show_resize_handle || false
335336
});
336337

337338
this.container.addClass(this.opts._class);
@@ -524,7 +525,7 @@
524525
self._update_container_height();
525526
}
526527
}).resizable({
527-
autoHide: true,
528+
autoHide: !this.opts.always_show_resize_handle,
528529
handles: 'se',
529530
minHeight: this.opts.cell_height - 10,
530531
minWidth: 70,

index.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,8 @@ <h3>Use with knockout.js</h3>
260260
hljs.initHighlightingOnLoad();
261261
$(function () {
262262
$('.grid-stack').gridstack({
263-
width: 12
263+
width: 12,
264+
always_show_resize_handle: /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)
264265
});
265266
});
266267
</script>

0 commit comments

Comments
 (0)