Window enabling / disabling

Thank you for your time and effort, really. It's nothing urgent, I'm just messing around with ZIM. I need to watch your ZIM 017 tutorials though. Have fun.

Okay - think I got it (luckily) it is okay to put the noDrag() outside the timeout and only put the stageUp() function in there. So that seems to solve the click on problem. There is still the enable=false issue when it has not yet animated back to in bounds... but as soon as you operate the window again, it works. So leaving it for now.

Do a hard refresh and it is better.

I think the safest way is not to use damp at the moment :slight_smile:

Well... it should be good now - did you try. Let us know.

So how the code should look like? Can you paste it here?

Just how you had it. With a hard refresh, my test of this works as expected.

const rct = new Rectangle(100,100, red);
rct.on("pressdown", function(evt) {  
	window.enabled = false;
});
rct.on("pressup", function(evt) { 
	window.enabled = true;
});
	
const tile = new Tile(rct,2,20,20,20);
const window = new Window({
	scrollBarDrag:true,
	content:tile, 
	damp:.1
}).center();

Yes, yes, yes! Now even my very first example (with window's content generated from Animate) works! Excellent!
Thank you :slight_smile:

1 Like