Re: [screen-orientation] screen orientation angle

2013-12-03 Thread Mounir Lamouri
On Tue, Dec 3, 2013, at 16:13, Jonas Sicking wrote: So I could see apps wanting to lock to that orientation (like you pointed out, we found at least one example in Firefox OS). However I don't understand the use case of locking to 90/180/270 degrees off of the normal orientation? Simply

Re: [screen-orientation] screen orientation angle

2013-12-03 Thread Jonas Sicking
On Tue, Dec 3, 2013 at 4:10 AM, Mounir Lamouri mou...@lamouri.fr wrote: On Tue, Dec 3, 2013, at 16:13, Jonas Sicking wrote: So I could see apps wanting to lock to that orientation (like you pointed out, we found at least one example in Firefox OS). However I don't understand the use case of

Re: [screen-orientation] screen orientation angle

2013-12-02 Thread Jonas Sicking
On Tue, Nov 26, 2013 at 8:38 AM, Mounir Lamouri mou...@lamouri.fr wrote: Hi, The Screen Orientation API defines an angle relationship between portrait-primary and landscape-primary. The reason for that is that developers would know which orientation is at 90 degrees from the current

Re: [screen-orientation] screen orientation angle

2013-11-27 Thread Mounir Lamouri
If Screen Orientation angle and Device Orientation have the same top for the device, it should be easy to make an angle relative to the top of screen instead of the top of the device. I would not recommend changing Device Orientation API. -- Mounir On Wed, Nov 27, 2013, at 7:41, Kenneth Rohde

[screen-orientation] screen orientation angle

2013-11-26 Thread Mounir Lamouri
Hi, The Screen Orientation API defines an angle relationship between portrait-primary and landscape-primary. The reason for that is that developers would know which orientation is at 90 degrees from the current orientation, which one is at 180 degrees, etc. However, by forcing the two primary

Re: [screen-orientation] screen orientation angle

2013-11-26 Thread Kenneth Rohde Christiansen
I am OK with this. When discussing with John Mellor, we also concluded that screen.orientationAngle was useful, due to the exact same reasons. Allowing lockOrientation to take either a string (with simple to use defaults) and take an angle for the more advanced use-cases, sounds like a pretty good

Re: [screen-orientation] screen orientation angle

2013-11-26 Thread Mounir Lamouri
On Wed, Nov 27, 2013, at 3:49, Kenneth Rohde Christiansen wrote: a) Will this be a delta from the current orientation? or relative to the default device orientation? I guess the former makes the most sense. Orientation angle compared to the native device orientation. b) What should happen if

Re: [screen-orientation] screen orientation angle

2013-11-26 Thread Kenneth Rohde Christiansen
Hi On Tue, Nov 26, 2013 at 5:55 PM, Mounir Lamouri mou...@lamouri.fr wrote: On Wed, Nov 27, 2013, at 3:49, Kenneth Rohde Christiansen wrote: a) Will this be a delta from the current orientation? or relative to the default device orientation? I guess the former makes the most sense.

RE: [screen-orientation] screen orientation angle

2013-11-26 Thread Domenic Denicola
It would be a shame to continue the trend of verbose web APIs. lockOrientation is nice. If it fails, the promise is rejected. Many operations can fail; this is not an argument for prefixing them with request. Just lock the orientation. If there's a problem locking it, we'll deal with it :)

Re: [screen-orientation] screen orientation angle

2013-11-26 Thread John Mellor
This all sounds reasonable; it's great that we'll be able to remove the spec's artificial requirement that if the device is in landscape-primary and is rotated 90 degrees clockwise, that should be represented as portrait-primary. And it potentially opens the door to using a less error-prone

Re: [screen-orientation] screen orientation angle

2013-11-26 Thread Lars Knudsen
+1 to this new angle ;) Seriously, it would be great if we can finally get closer to a solution where (especially) new web apps developers will not get too confused about different representations of orientation between different specs and devices. It would be great with some reference apps to

Re: [screen-orientation] screen orientation angle

2013-11-26 Thread John Mellor
Lars wrote: it would make sense to agree on portrait or landscape to be *the* primary orientation for all devices Hmm, but some devices don't have a primary portrait orientation. For example the Motorola Xoom has a clear primary landscape orientation, but users are equally likely to hold it in

Re: [screen-orientation] screen orientation angle

2013-11-26 Thread Charles McCathie Nevile
On Wed, 27 Nov 2013 01:22:47 +0700, John Mellor joh...@google.com wrote: Lars wrote: it would make sense to agree on portrait or landscape to be *the* primary orientation for all devices Hmm, but some devices don't have a primary portrait orientation. For example the Motorola Xoom has a

Re: [screen-orientation] screen orientation angle

2013-11-26 Thread Kenneth Rohde Christiansen
Hi, It seems a better option would be for the Device Orientation API to provide values relative to the current screen up direction. This could be optional if anyone can think of use cases where you both a) need absolute device orientation, and b) wouldn't have already locked the screen