ran pretty on the front
This commit is contained in:
parent
7743bda3eb
commit
4160235b92
54 changed files with 808 additions and 694 deletions
|
@ -1,16 +1,14 @@
|
|||
|
||||
class TouchScreenManager {
|
||||
|
||||
readonly supportTouchScreen:boolean;
|
||||
|
||||
readonly supportTouchScreen: boolean;
|
||||
|
||||
constructor() {
|
||||
this.supportTouchScreen = this.detectTouchscreen();
|
||||
}
|
||||
|
||||
//found here: https://stackoverflow.com/questions/4817029/whats-the-best-way-to-detect-a-touch-screen-device-using-javascript#4819886
|
||||
detectTouchscreen(): boolean {
|
||||
return (('ontouchstart' in window) || (navigator.maxTouchPoints > 0) || (navigator.msMaxTouchPoints > 0));
|
||||
return "ontouchstart" in window || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0;
|
||||
}
|
||||
}
|
||||
|
||||
export const touchScreenManager = new TouchScreenManager();
|
||||
export const touchScreenManager = new TouchScreenManager();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue