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
}
});
Thank you for this neat little example.
ReplyDeleteThank you! How to animate from top right of documenent
ReplyDeleteHi, how to maximize the window on load - I want the form to be maximized when I load/open the form.
ReplyDeleteThanks in advance,