PDA

View Full Version : [FIXED] Viewport orientation change event not exposed



BostonMerlin
11 Mar 2012, 5:16 AM
I'm trying to monitor when the viewports orientation is changed (landscape / portrait) but i'm not seeing any way to do this from within the Designer. I'm told to bind to orientation change of the viewport, so i do the following:

Create new Sencha Touch 2 project using Sencha Designer build 311
Add a container view
Add a controller
Add a controller action
In the controller action, I can set controlQuery to 'viewport' but there is no targetType of 'Ext.Viewport' and there is no 'orientation' type value to select from in the name drop down list.
Also told to try binding again the 'resize' event of a control but nothing i've done seems to work at all.
I can easily bind against the 'tap' events of buttons and they all work using the method above, except where i substitute viewport for button and monitor the 'tap' event.
Either this is a bug or i'm missing something.
Thanks
John

jjohnston
12 Mar 2012, 9:05 AM
Thanks for reporting this. I've opened a ticket for it, which we'll handle along with some other tickets we have regarding the viewport instance not being exposed for configuration.

aconran
23 Mar 2012, 7:35 AM
Jason and Dave did a bunch of the work to get this turned on in a near future build. :)

aconran
4 Apr 2012, 10:27 PM
This should be available in the current build out to the public (build 360).

john.hadfield@eon.com
23 May 2012, 2:46 AM
It's not appearing in Build 442 for me.

Can you confirm the fixed version?

Thanks

John

aconran
23 May 2012, 12:50 PM
It's not appearing in Build 442 for me.

Can you confirm the fixed version?

Thanks

John

Start a Touch Project
Select the Application in the Inspector
Search for Viewport in the Configuration grid
Add a Viewport config by clicking the +
Go to the viewport configuration by clicking the arrow ->
Click the + next to event bindings
Choose orientationchange