diff --git a/index.html b/index.html index d5857d1..48c4b50 100644 --- a/index.html +++ b/index.html @@ -35,6 +35,28 @@ caniuse: "screen-orientation", }; +
@@ -267,7 +289,7 @@

initially set to null, which is a promise whose associated operation is to lock the screen orientation.

-
+

Reading the screen orientation

@@ -284,11 +306,110 @@

For a given document, the current orientation type and the current orientation angle are strongly linked in the sense that for any given type, there will be a specific angle associated. - However, the user agent can associate *-primary - and *-secondary values at will. For example, if - 90 is associated with landscape-primary and - 270 with landscape-secondary for one - document , another one MAY get the opposite relationship. +

+

+ One primary orientation will always be determined by the natural + orientation of the device and this will then determine the secondary + value of its related orientation. +

+

+ For example a device held in its natural portrait orientation would + have a current orientation of portrait-primary and its + portrait-secondary orientation would be its position when + rotated 180°. +

+

+ The user agent can associate the other *-primary + and *-secondary values at will. For example, it can be + based on the device preferred angles, the user's preferred + orientations or the current orientation when the application starts. +

+

+ The screen orientation values table presents the primary and + secondary values that are determined by the device's natural + orientation and the possibilities available to the user agent + for setting the other primary and secondary orientation values. +

+ + +
+ The screen orientation values table +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Natural Orientation + + Primary Orientation 1 + + Secondary Orientation 1 + + Primary Orientation 2 + + Secondary Orientation 2 +
+ Portrait + + portrait-primary
+ Angle 0 +
+ portrait-secondary
+ Angle 180 +
+ landscape-primary
+ User agent to set at either Angle 90 or + Angle 270 +
+ landscape-secondary
+ Set at the angle not used for landscape-primary +
+ Landscape + + landscape-primary
+ Angle 0 +
+ landscape-secondary
+ Angle 180 +
+ portrait-primary
+ User agent to set at either Angle 90 or + Angle 270 +
+ portrait-secondary
+ Set at the angle not used for portrait-primary +
+

+ Once the user agent has set the primary and secondary values + from the options in the screen orientation values table, the + current orientation type and the current orientation + angle relation MUST be kept consistent for any given + document.

orientation.angle and orientation.type @@ -325,16 +446,6 @@

right, the current orientation angle would be 270 degrees. -

- The decision whether the document's current orientation - type should be set to *-primary or - *-secondary is up to the user agent. For example, - it can be based on the device preferred angles, the user's preferred - orientations or the current orientation when the application starts. - However, a user agent MUST keep the current orientation - type and the current orientation angle relation consistent - for any given document. -