summaryrefslogtreecommitdiff
path: root/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'index.js')
-rw-r--r--index.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/index.js b/index.js
index fef1073..5f4050d 100644
--- a/index.js
+++ b/index.js
@@ -48,7 +48,7 @@ const drawCross = (x, y) => {
canvas.addEventListener('mousedown', (e) => {
crosses.push({x: e.layerX - canvasOffsetX, y: e.layerY - canvasOffsetY});
- // moveTo((e.layerX - canvasOffsetX - canvas.width/2) * scale, (e.layerY - canvasOffsetY - canvas.height/2) * scale)
+ moveTo(-(e.layerX - canvasOffsetX - canvas.width/2) * scale, -(e.layerY - canvasOffsetY - canvas.height/2) * scale)
tr.a = Math.atan((-e.layerX + canvasOffsetX + canvas.width/2)/(e.layerY - canvasOffsetY - canvas.height/2))
if ( e.layerY - canvasOffsetY > canvas.height/2 )
@@ -124,4 +124,4 @@ const updateOnFrame = () => {
}
//updateOnFrame();
-window.onresize = update; \ No newline at end of file
+window.onresize = update;