Re: iOS: shouldRotateToOrientation javascript handler

2013-07-05 Thread Shazron
CDVInAppBrowser kinda does this already (hook into orientation changes) https://github.com/apache/cordova-ios/blob/2.9.0/CordovaLib/Classes/CDVInAppBrowser.m#L730-L756 https://github.com/apache/cordova-ios/blob/2.9.0/CordovaLib/Classes/CDVInAppBrowser.m#L99-L101 https://github.com/apache/cordova-io

Re: iOS: shouldRotateToOrientation javascript handler

2013-07-05 Thread Shazron
+1. We planned to make this cross-platform sometime ago, but nothing came of it (see comments): https://issues.apache.org/jira/browse/CB-751 On Fri, Jul 5, 2013 at 9:58 AM, Michal Mocny wrote: > Yes, the use cases are real, but I thought it was odd that we only have it > for iOS. Also odd tha

Re: iOS: shouldRotateToOrientation javascript handler

2013-07-05 Thread Michal Mocny
Yes, the use cases are real, but I thought it was odd that we only have it for iOS. Also odd that there is overhead for every rotation for every app, regardless of using this feature. We could perhaps add a config.xml flag to disable it by default, but its probably best to just replace it altoget

Re: iOS: shouldRotateToOrientation javascript handler

2013-07-05 Thread Shazron
If we have a suitable replacement to point users to - I'm all for it. The use case for this is if a user has an app that is portrait only, but needs to display something (video?) in landscape thus "overriding" the app default.s On Fri, Jul 5, 2013 at 9:11 AM, Michal Mocny wrote: > Yeah, sorry,

Re: iOS: shouldRotateToOrientation javascript handler

2013-07-05 Thread Michal Mocny
Yeah, sorry, I meant the JS method: window.shouldRotateToOrientation is undocumented and not supported on other platforms. On Fri, Jul 5, 2013 at 11:47 AM, Andrew Grieve wrote: > I think he means it's undocumented within Cordova's docs. > > > On Fri, Jul 5, 2013 at 11:20 AM, Ian Clelland > wro

Re: iOS: shouldRotateToOrientation javascript handler

2013-07-05 Thread Andrew Grieve
I think he means it's undocumented within Cordova's docs. On Fri, Jul 5, 2013 at 11:20 AM, Ian Clelland wrote: > I'm not sure what you mean by "Undocumented" in this case -- it's not a > private API that would get you booted from the App Store; it's a documented > method on UIView, although it'

Re: iOS: shouldRotateToOrientation javascript handler

2013-07-05 Thread Ian Clelland
I'm not sure what you mean by "Undocumented" in this case -- it's not a private API that would get you booted from the App Store; it's a documented method on UIView, although it's been deprecated recently.[1] Agreed that supporting the screen-orientation spec is probably the way to go in the futur

iOS: shouldRotateToOrientation javascript handler

2013-07-05 Thread Michal Mocny
iOS seems to have an undocumented "feature" to call into javascript before every device orientation change (pasted below for your viewing pleasure). I can't find any such similar functionality on other platforms, should it be removed? Likely we will want to write a screen orientation ( http://www