Animation 在Sencha Touch中,是否可以同时使用幻灯片和淡入淡出动画?
是否可以在show()时使用slideIn和fadeIn,在hide()时使用slideOut和fadeOutAnimation 在Sencha Touch中,是否可以同时使用幻灯片和淡入淡出动画?,animation,extjs,sencha-touch,Animation,Extjs,Sencha Touch,是否可以在show()时使用slideIn和fadeIn,在hide()时使用slideOut和fadeOut 非常感谢您的帮助!谢谢 尝试使用showAnimation和hideAnimation Ext.application({ name: 'Fiddle', launch: function() { var p, button = Ext.create('Ext.Button', { text: 'Butt
非常感谢您的帮助!谢谢 尝试使用showAnimation和hideAnimation
Ext.application({
name: 'Fiddle',
launch: function() {
var p,
button = Ext.create('Ext.Button', {
text: 'Button',
handler: function() {
if (p) {
p.hide();
}
p = Ext.create('Ext.Panel', {
html: 'Floating Panel',
height: 200,
width: 200,
top: 100,
left: 100,
padding: 10,
hidden: true,
showAnimation: {
preserveEndState: true,
duration: 300,
easing: 'ease-out',
from: {
'opacity': 0,
'top': 0
},
to: {
'opacity': 1,
'top': 100
}
},
hideAnimation: {
preserveEndState: true,
duration: 300,
easing: 'ease-out',
from: {
'opacity': 1,
'top': 100
},
to: {
'opacity': 0,
'top': 0
}
}
});
c.add(p);
p.show();
}
});
var c = Ext.create('Ext.Container', {
fullscreen: true,
items: [{
docked: 'top',
xtype: 'titlebar',
items: [
button
]
}]
});
}
});
此外,如果需要自定义动画,可以使用Ext.Animator:
Ext.Animator.run({
element: element,
preserveEndState: true,
duration: 300,
easing: 'ease-out',
to: {
},
onEnd: function () {
}
});