MCPcopy Index your code
hub / github.com/ColmapView/Colmapview.github.io / getTouchMediaState

Function getTouchMediaState

src/hooks/touchDevicePolicy.ts:34–46  ·  view source on GitHub ↗
(matchMedia?: TouchMediaMatcher)

Source from the content-addressed store, hash-verified

32};
33
34export function getTouchMediaState(matchMedia?: TouchMediaMatcher): TouchMediaState {
35 if (!matchMedia) {
36 return {
37 isCoarsePointer: false,
38 cannotHover: false,
39 };
40 }
41
42 return {
43 isCoarsePointer: matchMedia(COARSE_POINTER_QUERY).matches,
44 cannotHover: matchMedia(NO_HOVER_QUERY).matches,
45 };
46}
47
48export function shouldUseTouchMode({
49 isCoarsePointer,

Callers 3

detectTouchDeviceFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected