2
这样做的最佳方式是什么?例如:在qooxdoo窗口中集成qooxdoo效果
我想让窗口淡出(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();
}