Добавлен переход в полноэкраннй режим по двойному тапу в середину экрана

This commit is contained in:
Book Pauk
2022-12-16 18:14:08 +07:00
parent e296b49821
commit 481e1e840e
2 changed files with 17 additions and 3 deletions

View File

@@ -839,8 +839,7 @@ class Reader {
}
fullScreenToggle() {
this.fullScreenActive = !this.fullScreenActive;
if (this.fullScreenActive) {
if (!this.$q.fullscreen.isActive) {
this.$q.fullscreen.request();
} else {
this.$q.fullscreen.exit();

View File

@@ -1137,7 +1137,22 @@ class TextPage {
//движение вправо
this.doScrollingSpeedUp();
} else if (Math.abs(dy) < touchDelta && Math.abs(dx) < touchDelta) {
this.doToolBarToggle(event);
if (this.clickAction === 'tb' || this.clickAction === 'fs') {
this.clickAction = 'fs';
return;
}
(async() => {
this.clickAction = 'tb';
let i = 20;
while (i-- > 0 && this.clickAction === 'tb')
await utils.sleep(10);
if (this.clickAction === 'tb')
this.doToolBarToggle();
else
this.doFullScreenToggle();
this.clickAction = '';
})();
}
this.startTouch = null;