chayns-api 1.0.28 → 1.0.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -47,7 +47,7 @@ const getDeviceInfo = (userAgent, acceptHeader) => {
|
|
|
47
47
|
|
|
48
48
|
// Infos that are only available on client or iframe side
|
|
49
49
|
const getClientDeviceInfo = () => ({
|
|
50
|
-
isTouch:
|
|
50
|
+
isTouch: navigator.maxTouchPoints > 0 && window.matchMedia('(pointer: coarse)').matches
|
|
51
51
|
});
|
|
52
52
|
exports.getClientDeviceInfo = getClientDeviceInfo;
|
|
53
53
|
const getScreenSize = width => {
|
|
@@ -41,7 +41,7 @@ const getDeviceInfo = (userAgent, acceptHeader) => {
|
|
|
41
41
|
|
|
42
42
|
// Infos that are only available on client or iframe side
|
|
43
43
|
export const getClientDeviceInfo = () => ({
|
|
44
|
-
isTouch:
|
|
44
|
+
isTouch: navigator.maxTouchPoints > 0 && window.matchMedia('(pointer: coarse)').matches
|
|
45
45
|
});
|
|
46
46
|
export const getScreenSize = width => {
|
|
47
47
|
let value;
|