Update index.php
This commit is contained in:
parent
bbd2b01ca9
commit
d701d044a0
1 changed files with 2 additions and 2 deletions
|
@ -133,8 +133,8 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
function draw(e) {
|
function draw(e) {
|
||||||
var posX = (e.clientX - crect.left) * canvas.width / crect.width - 1;
|
var posX = e.offsetX * canvas.width / crect.width - 1;
|
||||||
var posY = (e.clientY - crect.top) * canvas.height / crect.height - 1;
|
var posY = e.offsetY * canvas.height / crect.height - 1;
|
||||||
|
|
||||||
console.log(posX + " " + posY);
|
console.log(posX + " " + posY);
|
||||||
|
|
||||||
|
|
Reference in a new issue