diff options
author | Zero~Informatique | 2020-02-11 01:44:24 +0100 |
---|---|---|
committer | Zero~Informatique | 2020-02-11 01:44:24 +0100 |
commit | 15b6de3e39a37950e5a1cfb827eab8e10f27546e (patch) | |
tree | 5b452ba619b2effdafefbf6e6470aff553e00b5d /viewer | |
parent | ff889de22e5c6fc5102395c5cf384a7e1e3dc801 (diff) | |
download | ldgallery-15b6de3e39a37950e5a1cfb827eab8e10f27546e.tar.gz |
viewer: fixed an issue on mobile phones; two clicks were required to follow a link
Diffstat (limited to 'viewer')
-rw-r--r-- | viewer/src/dragscrollclickfix.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/viewer/src/dragscrollclickfix.ts b/viewer/src/dragscrollclickfix.ts index 3db0b20..00360fb 100644 --- a/viewer/src/dragscrollclickfix.ts +++ b/viewer/src/dragscrollclickfix.ts | |||
@@ -20,7 +20,7 @@ | |||
20 | // https://github.com/donmbelembe/vue-dragscroll/issues/61 | 20 | // https://github.com/donmbelembe/vue-dragscroll/issues/61 |
21 | export default class DragScrollClickFix { | 21 | export default class DragScrollClickFix { |
22 | 22 | ||
23 | readonly DRAG_DELAY = 100; // This is the minimal delay to consider a click to be a drag, mostly usefull for touch devices | 23 | readonly DRAG_DELAY = 250; // This is the minimal delay to consider a click to be a drag, mostly usefull for touch devices |
24 | 24 | ||
25 | timer: NodeJS.Timeout | null = null; | 25 | timer: NodeJS.Timeout | null = null; |
26 | dragging: boolean = false; | 26 | dragging: boolean = false; |
@@ -39,6 +39,7 @@ export default class DragScrollClickFix { | |||
39 | clearTimeout(this.timer); | 39 | clearTimeout(this.timer); |
40 | this.timer = null; | 40 | this.timer = null; |
41 | } | 41 | } |
42 | setTimeout(() => this.dragging = false); | ||
42 | } | 43 | } |
43 | 44 | ||
44 | onClickCapture(e: MouseEvent) { | 45 | onClickCapture(e: MouseEvent) { |