зеркало из https://github.com/mozilla/gecko-dev.git
Bug 920946 - Introduce dwellend gesture to allow better touch typing. r=marcoz
This commit is contained in:
Родитель
547162ab7c
Коммит
f1fc93c986
|
@ -744,6 +744,7 @@ var Input = {
|
||||||
this.contextAction('forward');
|
this.contextAction('forward');
|
||||||
break;
|
break;
|
||||||
case 'exploreend1':
|
case 'exploreend1':
|
||||||
|
case 'dwellend1':
|
||||||
this.activateCurrent(null, true);
|
this.activateCurrent(null, true);
|
||||||
break;
|
break;
|
||||||
case 'swiperight2':
|
case 'swiperight2':
|
||||||
|
|
|
@ -392,6 +392,8 @@ TouchPoint.prototype = {
|
||||||
return {type: 'tap', x: this.startX, y: this.startY};
|
return {type: 'tap', x: this.startX, y: this.startY};
|
||||||
} else if (!this.done && duration == TouchAdapter.DWELL_THRESHOLD) {
|
} else if (!this.done && duration == TouchAdapter.DWELL_THRESHOLD) {
|
||||||
return {type: 'dwell', x: this.startX, y: this.startY};
|
return {type: 'dwell', x: this.startX, y: this.startY};
|
||||||
|
} else if (this.done && duration > TouchAdapter.DWELL_THRESHOLD) {
|
||||||
|
return {type: 'dwellend', x: this.startX, y: this.startY};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче