PDA

View Full Version : Layout bug when login panel is hidden?



DonRul
24 Feb 2012, 11:36 AM
I've run into an issue that I am not sure is a bug or not. Here is how to reproduce:

Create a login panel make this the initialView
Create a Navigation panel with basic information on it.

create a function onLoggedIn that looks like this:

var me = this;
var patientOrderStore = Ext.data.StoreManager.lookup('patientorderstore');me.navView = Ext.create('PgxPortal.view.MainNav');

Ext.Viewport.add(me.navView);
patientOrderStore.load(function() {
var loginPanel = me.getLoginPanel();
loginPanel.hide();
});


If the layout of the login Panel fills the screen (e.g. layout default or card) the navigation panel never shows when the login panel is hidden.
If the login panel has an explicit height and width (which in my case do not fill the screen) the navigation panel becomes visible when it is added to the viewport and remains visible once the loginPanel is hidden.

I am not sure if this is a bug but it sure stumped me for a while. I am not sure if I should create the navigation panel as the initial and then overlay it with the login panel in some way.