问题
I want to animate the transition when a card is activate on a Panel. any idea please?
The main.setActiveItem(1) is changing the card but I want to animate the transition from right to left (not the default from left to right)
I have this function:
buttonBackImageDetalle: function(button, e, options) {
var main = this.getMain();
//Ext.fx.Animation.setDirection('right');
main.setActiveItem(1);
console.log('<-- back');
}
Thanks for your time!
回答1:
Try this:
main.animateActiveItem(1, {type: 'slide', direction: 'right'})
回答2:
Hi if you are using controller use ref for main and pass xtype of view as follows.
this.getMain().animateActiveItem(your_xtype, {type: 'slide', direction: 'right'});
来源:https://stackoverflow.com/questions/10323083/how-to-animate-transition-from-right-to-left-on-sencha-touch-2