Skip to content
Snippets Groups Projects
Commit b5cdb066 authored by kyk1047715's avatar kyk1047715
Browse files

xy

parent f06af129
Branches
No related tags found
No related merge requests found
......@@ -95,7 +95,7 @@
function getPosition(event){
var bound = canvas.getBoundingClientRect();
var x = (event.pageX - bound.left) * (canvas.width / bound.width);
var y = (event.pageY - bound.top) * (canvas.height / bound.height);
var x = (event.x - bound.left) * (canvas.width / bound.width);
var y = (event.y - bound.top) * (canvas.height / bound.height);
return {X: x, Y: y};
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment