PDA

View Full Version : add and fx



Mycoding
3 Dec 2010, 11:11 AM
Please give me advice.

I have several panels in these panels there are many links when I chose some one in center part
of viewport at first disapear old form and then appear new form.
But it works wrong, form appear and then starts fx.
Should be so fx appear.
Here is code.
I use extension but with usual panel the same result.


function general_properties(){
var panel = new Vreshenie.form.PanelPropertyOfSite({
title:'????????? ?????',
iconCls:'icon-property'
});
if(Ext.getCmp('center').items.length==1){
Ext.getCmp('center').items.items[0].el.fadeOut({
callback:function(){
Ext.getCmp('center').removeAll();
Ext.getCmp('center').add(panel);
Ext.getCmp('center').doLayout();
Ext.getCmp('center').items.items[0].el.fadeIn({
callback:function(){
//Ext.getCmp('center').items.items[0].body.highlight();
}
});
}
});
}
else if(Ext.getCmp('center').items.length==0){
Ext.getCmp('center').add(panel);
Ext.getCmp('center').doLayout();
Ext.getCmp('center').items.items[0].el.fadeIn({
callback:function(){
//Ext.getCmp('center').items.items[0].body.highlight();
}
});
}
}

Condor
4 Dec 2010, 1:24 AM
You should initialize the new panel with opacity:0. The fadeIn animation will set it to opacity:1 again.

Mycoding
4 Dec 2010, 3:00 AM
But if will want to use slideIn and slideOut?
About opacity yu\ou mean to set hidden:true ?