开发者

Sencha Touch: animation on dispatch

开发者 https://www.devze.com 2023-02-22 13:00 出处:网络
How to use animations on Ext.dispatch ? This code doesn\'t work for me (layout type is \'card\'): Ext.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

精彩评论

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

关注公众号