如果实现onBoxReady()方法,窗口不可调整大小/可移动

时间:2016-06-22 18:07:11

标签: extjs

简单的问题......

this fiddle - 为什么我无法调整大小/移动窗口?如果我删除onBoxReady()函数,一切正常......

Ext.define('AWindow', {
    extend: 'Ext.window.Window',
    xtype: 'a-window',
    cls: 'attribute-window',

    me: this,

    items: [{
        ...added some items here... (see fiddle)
    }],

    // this is the function that disables the window move / resize 
    onBoxReady: function() {
        console.log('do something...');
    },

    closable: true,
    draggable: true,
    resizable: true
});

1 个答案:

答案 0 :(得分:5)

onBoxReady是受保护的方法,您需要在其中调用父方法:

onBoxReady: function(width, height) {
    this.callParent([width, height]);

    console.log('do something...');
}