From a592e91b8a43c5ab13eebfb25777daa198c82f6e Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Tue, 8 May 2018 11:35:27 +1200 Subject: [PATCH] Fixed little error with pos --- desktop/sources/scripts/guide.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/desktop/sources/scripts/guide.js b/desktop/sources/scripts/guide.js index 2f1bd1a..6e5e4d0 100644 --- a/desktop/sources/scripts/guide.js +++ b/desktop/sources/scripts/guide.js @@ -125,15 +125,13 @@ function Guide() } } - this.draw_cursor = function(pos,radius = 10) + this.draw_cursor = function(pos = dotgrid.cursor.pos,radius = 10) { - if(!pos || !pos.x || !pos.y){ return; } - var ctx = this.el.getContext('2d'); ctx.beginPath(); ctx.lineWidth = 3; ctx.lineCap="round"; - ctx.arc((pos.x * -2)+30, (pos.y * 2)+30, radius, 0, 2 * Math.PI, false); + ctx.arc(Math.abs(pos.x * -2)+30, Math.abs(pos.y * 2)+30, radius, 0, 2 * Math.PI, false); ctx.strokeStyle = dotgrid.theme.active.f_med; ctx.stroke(); ctx.closePath();