PDA

View Full Version : Uncollapsing left nav causes my center panel to resize



hayezblaze
18 Mar 2011, 8:06 PM
I'm learning EXT JS and ran into a bug.
When I collapse my left panel and then uncollapse it, the center panel of my region resizes itself.
I'm not sure why this is happening.
Any help would be appreciated.


Ext.onReady(function(){
// Menu containing actions
var tabActions = new Ext.Panel({
frame:true,
title: 'Actions',
collapsible:true,
contentEl:'actions',
titleCollapse: true
});

// Configure viewport
viewport = new Ext.Viewport({
layout:'border',
items:[{
//Global Page Header
cls: 'docs-header',
height: 35,
region:'north',
xtype:'box',
el:'header',
border:false,
margins: '0 0 0 0'
},new Ext.TabPanel({
//Main Tab Panel
id: 'center-panel',
region:'center',
resizeTabs:true,
minTabWidth:75,
plain: true,
deferredRender:false,
autoScroll: true,
margins:'0 4 4 0',
activeTab:0,
items:[{
//Main Tab 1
id:'tab1',
contentEl:'tabs',
title: 'Main',
closable:false,
autoScroll:true,
layout: 'border',
items: [new Ext.Panel({
//Left Hand Nav
id:'action-panel',
region: 'west',
split:true,
collapsible: false,
collapseMode: 'mini',
width:200,
minWidth: 150,
margins:'5 0 5 5',
border: false,
items: [tabActions]
}), new Ext.Panel({
//Content Panel
id:'main-panel',
region: 'center',
title: 'Main',
margins:'5 5 5 0',
border: true
})]

},{
id:'tab2',
contentEl:'tabs2',
title: 'Reports',
closable:false,
autoScroll:true,
layout: 'border'
}]
})
]});
});