You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hook to work with [Screen Orientation API](https://developer.mozilla.org/en-US/docs/Web/API/Screen_Orientation_API) and [Window Management API](https://developer.mozilla.org/en-US/docs/Web/API/Window_Management_API).
to interact with all screens or only with current screen.
36
+
>
37
+
38
+
> ### Returns
39
+
>
40
+
> : __Array__:
41
+
- _ScreenDetails_
42
+
- _(orientation: OrientationLockType)=>void_
43
+
- _()=> void_
44
+
> It contains:
45
+
> - __details__: an object with two properties:
46
+
> - _currentScreen_: object of type _ScreenDetail_ with informations of current screen.
47
+
> - _screens_: a _ScreenDetail_ array of all available screens, if browser supports this functionality, otherwise _undefined_.
48
+
> - A _ScreenDetail_ object has these properties:
49
+
> - __availHeight__
50
+
> - __availWidth__
51
+
> - __height__
52
+
> - __width__
53
+
> - __colorDepth__
54
+
> - __pixelDepth__
55
+
> - __orientation__:
56
+
> - __angle__
57
+
> - __type__
58
+
> - __availLeft__: only available if browser supports them, otherwise is _undefined_
59
+
> - __availTop__: only available if browser supports them, otherwise is _undefined_
60
+
> - __left__: only available if browser supports them, otherwise is _undefined_
61
+
> - __top__: only available if browser supports them, otherwise is _undefined_
62
+
> - __devicePixelRatio__: only available if browser supports them, otherwise is _undefined_
63
+
> - __isInternal__: only available if browser supports them, otherwise is _undefined_
64
+
> - __isPrimary__: only available if browser supports them, otherwise is _undefined_
65
+
> - __label__: only available if browser supports them, otherwise is _undefined_
66
+
> - __lock__: function that locks the orientation of the containing document to the specified orientation. Typically orientation locking is only enabled on mobile devices, and when the browser context is full screen.
67
+
> - __unlock__: function that unlocks the orientation of the containing document from its default orientation.
* **`useScreen`**: Hook to work with [Screen Orientation API](https://developer.mozilla.org/en-US/docs/Web/API/Screen_Orientation_API) and [Window Management API](https://developer.mozilla.org/en-US/docs/Web/API/Window_Management_API).
9
+
* @param {boolean} [allScreen=false] - to interact with all screens or only with current screen.
* - _currentScreen_: object of type _ScreenDetail_ with informations of current screen.
14
+
* - _screens_: a _ScreenDetail_ array of all available screens, if browser supports this functionality, otherwise _undefined_.
15
+
* - A _ScreenDetail_ object has these properties:
16
+
* - __availHeight__
17
+
* - __availWidth__
18
+
* - __height__
19
+
* - __width__
20
+
* - __colorDepth__
21
+
* - __pixelDepth__
22
+
* - __orientation__:
23
+
* - __angle__
24
+
* - __type__
25
+
* - __availLeft__: only available if browser supports them, otherwise is _undefined_
26
+
* - __availTop__: only available if browser supports them, otherwise is _undefined_
27
+
* - __left__: only available if browser supports them, otherwise is _undefined_
28
+
* - __top__: only available if browser supports them, otherwise is _undefined_
29
+
* - __devicePixelRatio__: only available if browser supports them, otherwise is _undefined_
30
+
* - __isInternal__: only available if browser supports them, otherwise is _undefined_
31
+
* - __isPrimary__: only available if browser supports them, otherwise is _undefined_
32
+
* - __label__: only available if browser supports them, otherwise is _undefined_
33
+
* - __lock__: function that locks the orientation of the containing document to the specified orientation. Typically orientation locking is only enabled on mobile devices, and when the browser context is full screen.
34
+
* - __unlock__: function that unlocks the orientation of the containing document from its default orientation.
0 commit comments