what's the best way of doing it? for example:
I want the window to fade (qx.fx.effect.core.Fade(DOM)
) when the user clics on the minimize
button. So I did this in the window class:
this.addListener("appear", function() {
this.minimizeEffect = /*fade effect*/;
},this);
this.addListener("beforeMinimize", function() {
this.minimizeEffect.start();/*delay(1000);*/
},this);
I need to do the delay because (I think) otherwise the window minimizes when it is just starting to fade!
Any solution? I've even tryed it with the finish
event of the effect with no luck.
Thank you!
Edit:
my delay()
function was wrong.. so it won't "compile", and that makes it all more confusing to me:
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();
}