From a7289cda748b9e7499196e2e678a38d0d70a4780 Mon Sep 17 00:00:00 2001 From: Book Pauk Date: Fri, 16 Dec 2022 20:04:20 +0700 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=BE=D0=BF=D1=80=D0=B0=D0=B2=D0=BA?= =?UTF-8?q?=D0=B8=20=D0=BF=D1=80=D0=BE=D1=86=D0=B5=D0=B4=D1=83=D1=80=D1=8B?= =?UTF-8?q?=20=D1=81=D0=BA=D1=80=D0=BE=D0=BB=D0=BB=D0=B8=D0=BD=D0=B3=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/components/Reader/TextPage/TextPage.vue | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/client/components/Reader/TextPage/TextPage.vue b/client/components/Reader/TextPage/TextPage.vue index 7ba740e1..f1fa92ab 100644 --- a/client/components/Reader/TextPage/TextPage.vue +++ b/client/components/Reader/TextPage/TextPage.vue @@ -582,16 +582,19 @@ class TextPage { const page = this.$refs.scrollingPage1; let i = 0; while (!this.stopScrolling) { - page.style.transition = `${this.scrollingDelay}ms ${this.scrollingType}`; - page.style.transform = `translateY(-${this.lineHeight}px)`; - if (i > 0) { this.doDown(); + await utils.sleep(1); + await this.$nextTick(); if (this.linesDown.length <= this.pageLineCount + 1) { this.stopScrolling = true; } } + + page.style.transition = `${this.scrollingDelay}ms ${this.scrollingType}`; + page.style.transform = `translateY(-${this.lineHeight}px)`; await transitionFinish(this.scrollingDelay); + page.style.transition = ''; page.style.transform = 'none'; page.offsetHeight;