auto controller on mobile

This commit is contained in:
Dominic DiTaranto 2025-12-29 18:49:30 -05:00
parent ba348975dd
commit 68d349ff67

View file

@ -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