javascript - How to set ExtJS window show/hide with animation? -


here sourcecode:

 ext.create('ext.window.window', {     id:'edit_segtype_win',     title:'msg',     layout: 'fit',     html:data,     modal:true,     resizable:false,     constrain:true }).show(undefined,bind_ajax_success); 

when call show(...),the window show without animation. want add animation,such fadein/fadeout/slidein/slideout. can me? thank you!

you can use anim object http://docs.sencha.com/extjs/4.2.0/#!/api/ext.fx.anim use in window component this:

var mywindow = ext.create('ext.window.window', {     html:"hello world", });  ext.create('ext.fx.anim', {     target: mywindow,     duration: 1000,     from: {         width: 400, //starting width 400         opacity: 0,       // transparent         color: '#ffffff', // white         left: 0     },     to: {         width: 300, //end width 300         height: 300 // end height 300     } }); 

and then, animation added when call

window.show(); 

Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -