diff options
Diffstat (limited to 'client/src/app/shared/misc')
-rw-r--r-- | client/src/app/shared/misc/screen.service.ts | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/client/src/app/shared/misc/screen.service.ts b/client/src/app/shared/misc/screen.service.ts index db481204e..af75569d9 100644 --- a/client/src/app/shared/misc/screen.service.ts +++ b/client/src/app/shared/misc/screen.service.ts | |||
@@ -18,6 +18,10 @@ export class ScreenService { | |||
18 | return this.getWindowInnerWidth() < 500 | 18 | return this.getWindowInnerWidth() < 500 |
19 | } | 19 | } |
20 | 20 | ||
21 | isInTouchScreen () { | ||
22 | return 'ontouchstart' in window || navigator.msMaxTouchPoints | ||
23 | } | ||
24 | |||
21 | // Cache window inner width, because it's an expensive call | 25 | // Cache window inner width, because it's an expensive call |
22 | private getWindowInnerWidth () { | 26 | private getWindowInnerWidth () { |
23 | if (this.cacheWindowInnerWidthExpired()) this.refreshWindowInnerWidth() | 27 | if (this.cacheWindowInnerWidthExpired()) this.refreshWindowInnerWidth() |