From acb800da954eda3f563e2879af538d61655b7862 Mon Sep 17 00:00:00 2001 From: Book Pauk Date: Sun, 20 Jan 2019 19:27:26 +0700 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=BE=D0=BF=D1=80=D0=B0=D0=B2=D0=BA?= =?UTF-8?q?=D0=B0=20=D0=B1=D0=B0=D0=B3=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/components/Reader/TextPage/TextPage.vue | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/client/components/Reader/TextPage/TextPage.vue b/client/components/Reader/TextPage/TextPage.vue index d9ef12e7..23437555 100644 --- a/client/components/Reader/TextPage/TextPage.vue +++ b/client/components/Reader/TextPage/TextPage.vue @@ -429,29 +429,33 @@ class TextPage extends Vue { } } - async startClickRepeat(pointX, pointY) { + async startClickRepeat(pointX, pointY, debounced) { + this.repX = pointX; + this.repY = pointY; + if (!this.repInit) { this.repInit = true; this.repStart = true; - await sleep(1000); + if (!debounced) + await sleep(800); if (this.debouncedRepStart) { this.debouncedRepStart = false; this.repInit = false; - await this.startClickRepeat(pointX, pointY); + await this.startClickRepeat(this.repX, this.repY, true); } if (this.repStart) { this.repDoing = true; - let delay = 500; + let delay = 400; while (this.repDoing) { this.handleClick(pointX, pointY); await sleep(delay); if (delay > 15) - delay *= 0.7; + delay *= 0.8; } }