O'Reilly Forums: Implement Below In Ch.10-Fractal Exa, But When Initiate Ondblclick Before Finish Executio - O'Reilly Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Implement Below In Ch.10-Fractal Exa, But When Initiate Ondblclick Before Finish Executio

#1 User is offline   lse123polis 

  • Active Member
  • PipPip
  • Group: Members
  • Posts: 39
  • Joined: 04-October 09

Posted 14 December 2012 - 03:44 AM

I am going implement below in ch.10-fractal exa, but when initiate ondblclick before finish execution, startup the onclick function... what to do to can click one of the two not the other?

	
	canvas.ondblclick = function() {
		window.location = canvas.toDataURL('image/png');
	};
	canvas.onclick = function(event) {
		//var t=setTimeout(function(){alert("done")},10000)
		handleClick(event.clientX, event.clientY);
	};

0

#2 User is offline   lse123polis 

  • Active Member
  • PipPip
  • Group: Members
  • Posts: 39
  • Joined: 04-October 09

Posted 14 December 2012 - 03:49 AM

is any other way from>>>
	canvas.ondblclick = function() {
		window.location = canvas.toDataURL('image/png');
		
	};
	
	canvas.onclick = function(event) {
		var t=setTimeout(function(){handleClick(event.clientX, event.clientY);},10000)
		//handleClick(event.clientX, event.clientY);
	};
	




View Postlse123polis, on 14 December 2012 - 03:44 AM, said:

I am going implement below in ch.10-fractal exa, but when initiate ondblclick before finish execution, startup the onclick function... what to do to can click one of the two not the other?

	
	canvas.ondblclick = function() {
		window.location = canvas.toDataURL('image/png');
	};
	canvas.onclick = function(event) {
		//var t=setTimeout(function(){alert("done")},10000)
		handleClick(event.clientX, event.clientY);
	};


0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users