EXTjs自适应窗口大小问题 求大神指点

代码如下:
Ext.define('MyApp.view.MyPanel', {
extend: 'Ext.panel.Panel',

autoRender: false,
id: 'panel',
layout: {
    type: 'fit'
},
overlapHeader: true,
title: '分支机构目录',
titleAlign: 'left',
titleCollapse: false,

initComponent: function() {
    var me = this;

    Ext.applyIf(me, {
        items: [
            {
                xtype: 'treepanel',
                autoRender: false,
                id: 'treepanel',
                itemId: 'panel',
                constrain: true,
                autoScroll: true,
                defaultAlign: '[100%,100%]',
                header: false,
                title: 'My Tree Panel'
            }
        ],
        dockedItems: [
            {
                xtype: 'container',
                dock: 'bottom',
                id: 'container',
                layout: {
                    type: 'hbox'
                },
                items: [
                    {
                        xtype: 'button',
                        margins: '7 5 0 0 ',
                        margin: '0 5 0 0',
                        width: 80,
                        allowDepress: false,
                        iconAlign: 'top',
                        iconCls: '',
                        menuAlign: 'tl----bl?',
                        text: '新增分类'
                    },
                    {
                        xtype: 'button',
                        margins: '7 5 0 0 ',
                        margin: '0 5 0 0 ',
                        width: 80,
                        text: '修改分类'
                    },
                    {
                        xtype: 'button',
                        margins: '7 5 0 0 ',
                        margin: '0 5 0 0 ',
                        width: 80,
                        text: '删除分类'
                    },
                    {
                        xtype: 'button',
                        margins: '7 5 0 0 ',
                        margin: '0 5 0 0 0 ',
                        width: 100,
                        text: '新增分支机构'
                    },
                    {
                        xtype: 'button',
                        margins: '7 5 0 0 ',
                        margin: '0 5 0 0 0',
                        width: 100,
                        text: '修改分支机构'
                    },
                    {
                        xtype: 'button',
                        margins: '7 5 0 0 ',
                        margin: '0 5 0 0',
                        width: 100,
                        text: '删除分支机构'
                    },
                    {
                        xtype: 'button',
                        margins: '7 5 0 0 ',
                        margin: '0 5 0 0 ',
                        width: 100,
                        text: '停用分支机构'
                    },
                    {
                        xtype: 'button',
                        margins: '7 5 0 0 ',
                        margin: '0 5 0 0',
                        width: 60,
                        text: '移动'
                    },
                    {
                        xtype: 'container',
                        flex: 1,
                        layout: {
                            align: 'middle',
                            pack: 'end',
                            type: 'hbox'
                        },
                        items: [
                            {
                                xtype: 'button',
                                margins: '5 5 0 0 ',
                                autoRender: false,
                                margin: '0 5 0 0 ',
                                width: 60,
                                iconAlign: 'right',
                                text: '退出'
                            },
                            {
                                xtype: 'button',
                                margins: '5 5 0 0 ',
                                margin: '0 5 0 0',
                                width: 60,
                                text: '刷新'
                            }
                        ]
                    }
                ]
            }
        ]
    });

    me.callParent(arguments);
}

});