-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle message for platforms and geometry
Signed-off-by: Daniel Kastl <daniel@georepublic.de>
- Loading branch information
Showing
5 changed files
with
38 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/** | ||
* Utility function to detect touch devices | ||
* @param isTouchDevice - boolean | ||
* @returns boolean | ||
*/ | ||
export const isTouchDevice = (): boolean => { | ||
return ('ontouchstart' in window) || (navigator.maxTouchPoints > 0); | ||
} | ||
|
||
/** | ||
* Utility function to detect macOS | ||
* @param isMacOS - boolean | ||
* @returns boolean | ||
*/ | ||
export const isMacOS = (): boolean => { | ||
return /Macintosh|MacIntel|MacPPC|Mac68K/.test(navigator.userAgent); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters