Search code examples
extjspositionwindowoverridingminimize

ExtJS: How to override custom minimize behavior of Ext.window.Window?


There is a minimizable boolean config which fires minimize event.

The question is, how can I override and define a new position on DOM for this event? My aim is minimize the window to footer panel of application.

Below stated minimize function of Ext.window.Window;

minimize: function () {
    this.fireEvent('minimize', this);
    return this;
}

Solution

  • You can try this like below:-

    "minimize": function (window, opts) {
        window.collapse();
        window.setWidth(150);
        window.alignTo(Ext.getBody(), 'bl-bl')
    }
    

    Working fiddle

    Note: You can read more about alignTo options here.