Handle double tab as if it was a double_click
This commit is contained in:
parent
7419b37847
commit
108eeb5898
21
src/bar.js
21
src/bar.js
@ -385,6 +385,27 @@ export default class Bar {
|
|||||||
});
|
});
|
||||||
|
|
||||||
$.on(this.group, 'dblclick', (e) => {
|
$.on(this.group, 'dblclick', (e) => {
|
||||||
|
if (this.action_completed) {
|
||||||
|
// just finished a move action, wait for a few seconds
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.group.classList.remove('active');
|
||||||
|
if (this.gantt.popup)
|
||||||
|
this.gantt.popup.parent.classList.remove('hide');
|
||||||
|
|
||||||
|
this.gantt.trigger_event('double_click', [this.task]);
|
||||||
|
});
|
||||||
|
let tapedTwice = false;
|
||||||
|
$.on(this.group, 'touchstart', (e) => {
|
||||||
|
if (!tapedTwice) {
|
||||||
|
tapedTwice = true;
|
||||||
|
setTimeout(function () { tapedTwice = false; }, 300);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
e.preventDefault();
|
||||||
|
//action on double tap goes below
|
||||||
|
|
||||||
|
|
||||||
if (this.action_completed) {
|
if (this.action_completed) {
|
||||||
// just finished a move action, wait for a few seconds
|
// just finished a move action, wait for a few seconds
|
||||||
return;
|
return;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user