开发者

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);
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜