Pages

Monday, July 1, 2013

Animating windows in ExtJS

The following code will override the Window class, causing animation on show, close, maximize, and restore.

You need to set {maximizable:true} in your Window config to get the maximize button.


Ext.window.Window.override({

  animateTarget: Ext.getDoc(), //animate on show/close from top left of document
  
  maximize: function(){
    this.callParent([true]); //animate
  },

  restore: function(){
    this.callParent([true]); //animate
  }  
});

 

3 comments:

  1. Thank you for this neat little example.

    ReplyDelete
  2. Thank you! How to animate from top right of documenent

    ReplyDelete
  3. Hi, how to maximize the window on load - I want the form to be maximized when I load/open the form.

    Thanks in advance,

    ReplyDelete