PDA

View Full Version : Orientation problems



connorsmacartist
24 Jun 2011, 12:45 PM
Hello all I am going a little crazy with orientation problems:
I have a basic application


// app.js:
/////////////////////////////////////////////////////
Ext.ns(''KOI', 'KOI.views');

Ext.regApplication({
name : "app",
launch: function() {
KOI.views.viewport = new KOI.views.Viewport({
application: this
});
}
});



// viewport:
/////////////////////////////////////////////////////

KOI.views.Viewport = Ext.extend(Ext.Panel, {
fullscreen: true,
layout: 'fit',
initComponent: function() {
Ext.apply(KOI.views, {
startScreen: new KOI.views.StartScreen()
});
Ext.apply(this, {
items: [
KOI.views.startScreen
]
});
KOI.views.Viewport.superclass.initComponent.apply(this, arguments);
}
});



// And the view file:
/////////////////////////////////////////////////////

KOI.views.StartScreen = Ext.extend(Ext.Panel, {

initComponent: function() {
this.toolbar = new Ext.Toolbar({
dock: 'top',
title: this.panel_title,
items: [{
text: 'back',
ui: 'back',
handler: this.backBtn,
scope: this
}]
});
this.dockedItems = [this.toolbar];
KOI.views.StartScreen.superclass.initComponent.call(this);

},
backBtn: function() {
window.history.back();
}
});



First turning fullscreen: to false on viewport and the application fails. But more importantly the auto orientation doesn't work at all. Start in portrait and switch to landscape- the screen looks like the attachment. Its off and shifted up by the amount of the url bar. I've been struggling with layout and listening to orientation change- doing layout update, nothing seems to work. It is the latest sencha.js and iphone 3G ios 4.3.3. Does anyone have any ideas?

NOTE: this problem exist in the twitter & geocongress application as well

connorsmacartist
26 Jun 2011, 8:37 AM
Seriuosly? Your own examples are broken and no response and my only option is to find an answer in incomplete documentation. This is basic functionality of a mobile framework of screen orientation- which means sencha is a non-starter.