Wednesday, May 2, 2012

HTML5 Canvas Mouse coordinates

I am in one .html create two first canvas have mouseDown, mouseUp, mouseMove event's and I am need for second set mouseClick event, but...
I am don't get real coordinates. something like my second canvas is 400x400 pixels and I set code:

secondCanvas.addEventListener('click', function(e) {
}, false);

if I click on top left point mouse I am get in console 500~ number, but not zero...

Sorry for my bad English language

No comments:

Post a Comment