Re: [screen-orient] Updated editor draft

Why not use the existing definitions in the orientation change event?

http://developer.apple.com/library/ios/#documentation/AppleApplications/Reference/SafariWebContent/HandlingEvents/HandlingEvents.html#//apple_ref/doc/uid/TP40006511-SW16

simple "landscape" and "portrait" can always be deducted from the values -
but you have more precise info.  This is also possible to map to/from
accelerometer data if needed.

(speaking as a web demos/apps/games developer).

code quote:

switch(window.orientation)
                {
                    case 0:
                        displayStr += "Portrait";
                    break;

                    case -90:
                        displayStr += "Landscape (right, screen turned
clockwise)";
                    break;

                    case 90:
                        displayStr += "Landscape (left, screen turned
counterclockwise)";
                    break;

                    case 180:
                        displayStr += "Portrait (upside-down portrait)";
                    break;

                }

br
Lars


On Mon, Nov 5, 2012 at 4:54 PM, Mounir Lamouri <mounir@lamouri.fr> wrote:

> Hi,
>
> I've just pushed a new editor draft [1] with some cosmetic/editorial
> changes and a new feature: lockOrientation() can now be called with a
> sequence<DOMString> to lock the screen to different orientations (for
> example, "portrait-primary" and "landscape-primary").
>
> Any feedback is welcome!
>
> Note that I will update the WD in about a week if I do not hear anything
> in the meantime.
>
> [1] http://dvcs.w3.org/hg/screen-orientation/raw-file/tip/Overview.html
>
> Thanks,
> --
> Mounir
>
>

Received on Monday, 5 November 2012 17:20:10 UTC