Рефакторинг
This commit is contained in:
@@ -1080,21 +1080,21 @@ class TextPage {
|
|||||||
//движение вправо
|
//движение вправо
|
||||||
this.doScrollingSpeedUp();
|
this.doScrollingSpeedUp();
|
||||||
} else if (Math.abs(dy) < touchDelta && Math.abs(dx) < touchDelta) {
|
} else if (Math.abs(dy) < touchDelta && Math.abs(dx) < touchDelta) {
|
||||||
if (this.clickAction === 'tb' || this.clickAction === 'fs') {
|
if (this.touchMode) {
|
||||||
this.clickAction = 'fs';
|
this.touchMode = 2;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
(async() => {
|
(async() => {
|
||||||
this.clickAction = 'tb';
|
this.touchMode = 1;
|
||||||
let i = 20;
|
let i = 20;
|
||||||
while (i-- > 0 && this.clickAction === 'tb')
|
while (i-- > 0 && this.touchMode === 1)
|
||||||
await utils.sleep(10);
|
await utils.sleep(10);
|
||||||
if (this.clickAction === 'tb')
|
if (this.touchMode === 1)
|
||||||
this.doToolBarToggle();
|
this.doToolBarToggle();
|
||||||
else
|
else
|
||||||
this.doFullScreenToggle();
|
this.doFullScreenToggle();
|
||||||
this.clickAction = '';
|
this.touchMode = 0;
|
||||||
})();
|
})();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user