From 696c5ed64441ec61c8986b9d5e8f1dbe72996a52 Mon Sep 17 00:00:00 2001
From: Young Guk Kim <kyk1047715@gmail.com>
Date: Wed, 25 Apr 2018 07:09:15 +0900
Subject: [PATCH] s

---
 ti/static/ti/cv.js | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/ti/static/ti/cv.js b/ti/static/ti/cv.js
index c01989c..432419c 100644
--- a/ti/static/ti/cv.js
+++ b/ti/static/ti/cv.js
@@ -87,7 +87,8 @@
   }
 
   function getPosition(event){
-      var x = event.x;
-      var y = event.y;
+      var bound = canvas.getBoundingClientRect();
+      var x = (event.pageX - bound.left) * (canvas.width / bound.width);
+      var y = (event.pageY - bound.top) * (canvas.height / bound.height);
       return {X: x, Y: y};
   }
-- 
GitLab