From ae823774a8af344f9c7ea173759ba17f8339032a Mon Sep 17 00:00:00 2001 From: Fransan Date: Thu, 3 Aug 2017 12:26:56 -0400 Subject: [PATCH] Issue #318 Moved clearRect one pixel to the left to match lineWidth. Made clearRect 2px wide to make sure both sides of the line path are cleared. --- js/plugins/crosshair.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/plugins/crosshair.js b/js/plugins/crosshair.js index b1349572..ae2cad4a 100644 --- a/js/plugins/crosshair.js +++ b/js/plugins/crosshair.js @@ -67,9 +67,9 @@ Flotr.addPlugin('crosshair', { if (position) { context.clearRect( - Math.round(position.relX) + plotOffset.left, + Math.round(position.relX) + plotOffset.left - 1, plotOffset.top, - 1, + 2, this.plotHeight + 1 ); context.clearRect(