auto controller on mobile
This commit is contained in:
parent
ba348975dd
commit
68d349ff67
1 changed files with 1 additions and 3 deletions
|
|
@ -20,14 +20,13 @@ class Dialog {
|
|||
|
||||
dialogListener(event) {
|
||||
console.log(event)
|
||||
if (event.key === 'Enter' || event.type === 'click' || event.type === 'touchstart') {
|
||||
if (event.key === 'Enter' || event.type === 'touchstart') {
|
||||
event.currentTarget.self.startIntroDialogSequence()
|
||||
}
|
||||
}
|
||||
|
||||
startIntroDialogSequence() {
|
||||
document.removeEventListener("keydown", this.dialogListener);
|
||||
document.removeEventListener('click', this.dialogListener)
|
||||
document.removeEventListener('touchstart', this.dialogListener)
|
||||
if (this.currentDialogIndex > this.dialogOrder.length - 1) {
|
||||
this.dialogElem.style.display = 'none'
|
||||
|
|
@ -53,7 +52,6 @@ class Dialog {
|
|||
|
||||
var self = this
|
||||
document.addEventListener('keydown', this.dialogListener)
|
||||
document.addEventListener('click', this.dialogListener)
|
||||
document.addEventListener('touchstart', this.dialogListener)
|
||||
|
||||
document.self = self
|
||||
|
|
|
|||
Loading…
Reference in a new issue