Sencha Touch: animation on dispatch
How to use animations on Ext.dispatch ?
This code doesn't work for me (layout type is 'card'):
Ext.dispatch({
controller: 'main',
action: 'whoweare',
animation: { type: 'slide', direction: 'right' }
}开发者_运维百科);
You should use the animation object you pass to the controller while calling setActiveItem of your viewport in the controller.
So, in the whoweare function of your main controller:
whoweare: function(options) {
newPanel = new myApp.views.myPanel();
myApp.views.viewport.setActiveItem(newPanel, options.animation);
}
精彩评论