简体   繁体   English

全局禁用Ext JS动画

[英]Globally disable Ext JS Animations

I'm testing an intranet web app in an iPad but the animations to open "windows" and show message boxes are horribly slow. 我正在用iPad测试Intranet Web应用程序,但是打开“窗口”和显示消息框的动画非常慢。

I've tried setting the global Ext.enableFx to false, and confirmed that flag is still false after page load in Firebug. 我尝试将全局Ext.enableFx设置为false,并确认Firebug页面加载后该标志仍然为false。 The animations are still occurring though so I must be doing something wrong. 动画仍然在发生,所以我一定做错了。

Thanks... 谢谢...

When you show a window, the second (optional) argument to show() is the target to animate from. 显示窗口时, show()的第二个(可选)参数是要作为动画目标的对象。 Omit that and you should not get the animation. 忽略它,您就不应该获得动画。

EDIT: 编辑:

Not tested, but glancing at the Window code you should be able to do this (put it after your Ext includes and before your app code): 没有经过测试,但是浏览一下Window代码,您应该可以做到这一点(在Ext包括后,在您的应用程序代码之前):

Ext.override(Ext.Window, {
    animShow: function(){
        this.afterShow();
    },
    animHide: function(){
       this.el.hide();
       this.afterHide();
    }
});

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM