From ee7c14481b23653ac451e8162533115b3b8147f6 Mon Sep 17 00:00:00 2001 From: Book Pauk Date: Sat, 19 Jan 2019 01:00:06 +0700 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB=20?= =?UTF-8?q?=D1=80=D0=B5=D0=B0=D0=BA=D1=86=D0=B8=D1=8E=20=D0=BD=D0=B0=20onw?= =?UTF-8?q?heel?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/Reader/TextPage/TextPage.vue | 23 ++++++++----------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/client/components/Reader/TextPage/TextPage.vue b/client/components/Reader/TextPage/TextPage.vue index 83528eaf..109fb110 100644 --- a/client/components/Reader/TextPage/TextPage.vue +++ b/client/components/Reader/TextPage/TextPage.vue @@ -1,6 +1,7 @@ @@ -329,28 +330,24 @@ class TextPage extends Vue { onTouchStart(event) { if (event.touches.length == 1) { const touch = event.touches[0]; - const result = this.handleClick(touch.clientX, touch.clientY) - - if (result) { - event.stopPropagation(); - event.preventDefault(); - } + this.handleClick(touch.clientX, touch.clientY) } } onMouseDown(event) { - let result = false; if (event.button == 0) { - result = this.handleClick(event.clientX, event.clientY); + this.handleClick(event.clientX, event.clientY); } else if (event.button == 2) { this.doToolBarToggle(); - result = true; } + } - if (result) { - event.stopPropagation(); - event.preventDefault(); + onMouseWheel(event) { + if (event.deltaY > 0) { + this.doDown(); + } else if (event.deltaY < 0) { + this.doUp(); } }