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

its*_*e69 1 extjs

简单问题......

看着这个小提琴 - 为什么我无法调整大小/移动窗口?如果我删除该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
});
Run Code Online (Sandbox Code Playgroud)

Ale*_*rev 5

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

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

    console.log('do something...');
}
Run Code Online (Sandbox Code Playgroud)