Update index.php
This commit is contained in:
parent
61e7c63683
commit
57aaa59e3d
1 changed files with 2 additions and 0 deletions
|
@ -135,6 +135,8 @@
|
||||||
function draw(e) {
|
function draw(e) {
|
||||||
var posX = (e.clientX - crect.left) * canvas.width / crect.width - 1;
|
var posX = (e.clientX - crect.left) * canvas.width / crect.width - 1;
|
||||||
var posY = (e.clientY - crect.top) * canvas.height / crect.height - 1;
|
var posY = (e.clientY - crect.top) * canvas.height / crect.height - 1;
|
||||||
|
|
||||||
|
debug(posX + " " + posY);
|
||||||
|
|
||||||
ctx.putImageData(pen, posX, posY);
|
ctx.putImageData(pen, posX, posY);
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue