Add delay of 1.5s for draggable items on touch devices

This commit is contained in:
Frederic Guillot
2015-08-29 11:57:09 -04:00
parent f4c3ca9991
commit 720d1bc3bd
14 changed files with 80 additions and 35 deletions

View File

@@ -268,6 +268,7 @@ Gantt.prototype.listenForBlockResize = function(startDate) {
jQuery("div.ganttview-block", this.options.container).resizable({
grid: this.options.cellWidth,
handles: "e,w",
delay: $.support.touch ? 1500 : 300,
stop: function() {
var block = jQuery(this);
self.updateDataAndPosition(block, startDate);
@@ -282,6 +283,7 @@ Gantt.prototype.listenForBlockMove = function(startDate) {
jQuery("div.ganttview-block", this.options.container).draggable({
axis: "x",
delay: $.support.touch ? 1500 : 300,
grid: [this.options.cellWidth, this.options.cellWidth],
stop: function() {
var block = jQuery(this);