From 7677d593467e7cc29cf10f28301152776c027bd2 Mon Sep 17 00:00:00 2001 From: Terry Truong Date: Tue, 28 Jun 2022 22:24:55 +1000 Subject: Use double-taps on mobile --- src/util.ts | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/util.ts') diff --git a/src/util.ts b/src/util.ts index 907cce5..3feb419 100644 --- a/src/util.ts +++ b/src/util.ts @@ -31,6 +31,10 @@ export function getScrollBarWidth(){ // return scrollBarWidth; } +// Detects a touch device +export function isTouchDevice(){ + return window.matchMedia('(pointer: coarse)').matches; +} // Returns [0 ... len] export function range(len: number): number[] { -- cgit v1.2.3