I was changing up some code and wanted to point this out to see if this is an issue.
This snip works great. Props for the inline animation.
but it had side effect when I put
with the update at the end it never shows any code. and doesn't react to the pause.
or
uses the pause but never shows the text until it slides out.
If I am not using this right then could someone please advise. If this is a bug then I hope this helps.
Tested in: IE7, FireFox
This snip works great. Props for the inline animation.
Ext.get('error').hide().update(response.errorMessage).slideIn("t").pause(2).slideOut("t");
Ext.get('error').hide().update(response.errorMessage).slideIn("t").pause(2).slideOut("t").update("");
or
Ext.get('error').hide().update(response.errorMessage).slideIn("t").pause(2).slideOut("t").hide();
If I am not using this right then could someone please advise. If this is a bug then I hope this helps.
Tested in: IE7, FireFox

|
#2
|
|
At the moment, it is slightly confusing, but you cannot chain just any Element methods together with effects like that. The reason is that only the Fx methods go through the internal effects queue so that they get sequenced correctly. Adding non-Fx method calls (like update) in the chain can have unexpected results.
One thing you can do is pass a callback into the effects methods, so you might try adding a separate function (it can be anonymous) that does your final update, and pass that in as the callback to your last effect so that it gets called after the slideOut completes. We'll be sure to clarify this limitation once the docs have been updated.
__________________
Brian Moeskau FAQ / Tutorials / User Extensions / Enhanced Forum Search ![]() |
本文探讨了ExtJS中元素动画效果与链式调用update方法时出现的问题,包括显示文本异常和暂停效果失效等现象,并提供了解决方案,建议使用回调函数来确保动画完成后执行更新。
1222

被折叠的 条评论
为什么被折叠?



