W3C home > Mailing lists > Public > public-webapps@w3.org > October to December 2012

Re: [screen-orient] Updated editor draft

From: Lars Knudsen <larsgk@gmail.com>
Date: Mon, 5 Nov 2012 18:19:39 +0100
Message-ID: <CA+jkkcjnpH608-iKdAQUwtfZSzw+aR--b8pU7HJwXDh2YmvYLQ@mail.gmail.com>
To: Mounir Lamouri <mounir@lamouri.fr>
Cc: WebApps WG <public-webapps@w3.org>
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 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:55 GMT