From 663173bd4e168b11b2faf7028be961202d64fce7 Mon Sep 17 00:00:00 2001 From: Shimon Doodkin Date: Thu, 5 Apr 2018 22:12:01 +0300 Subject: [PATCH] Fixed an off-by-one error in boundX https://github.com/HumbleSoftware/Flotr2/pull/248 --- js/plugins/selection.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/plugins/selection.js b/js/plugins/selection.js index 33aab275..a3850865 100644 --- a/js/plugins/selection.js +++ b/js/plugins/selection.js @@ -14,7 +14,7 @@ function isLeftClick (e, type) { } function boundX(x, graph) { - return Math.min(Math.max(0, x), graph.plotWidth - 1); + return Math.min(Math.max(0, x), graph.plotWidth); } function boundY(y, graph) {