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();
}