最好的方法是什么?例如:
qx.fx.effect.core.Fade(DOM)
当用户单击minimize
按钮时,我希望窗口淡出( )。所以我在窗口类中这样做了:
this.addListener("appear", function() {
this.minimizeEffect = /*fade effect*/;
},this);
this.addListener("beforeMinimize", function() {
this.minimizeEffect.start();/*delay(1000);*/
},this);
我需要延迟,因为(我认为)否则窗口会在它刚刚开始褪色时最小化!有什么解决办法吗?我什至尝试finish
过没有运气的效果事件。谢谢!
编辑:我的delay()
函数错了..所以它不会“编译”,这让我更加困惑:
function delay(ms){//this works (it fades ok)
var date = new Date();
var curDate = new Date();
while(curDate-date < milis)//this is wrong, milis don't exist
curDate = new Date();
}
function delay(ms){//it donesn't work (no fade)
var date = new Date();
var curDate = new Date();
while(curDate-date < ms)//this is "good"
curDate = new Date();
}