From 54647068a0d3482895e7936eb290b72d1ea2b6b2 Mon Sep 17 00:00:00 2001 From: WofWca Date: Wed, 6 Oct 2021 20:27:34 +0800 Subject: [PATCH] perf: improve `updateTooltip` performance --- smoothie.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/smoothie.js b/smoothie.js index 6c283c3..9923479 100644 --- a/smoothie.js +++ b/smoothie.js @@ -592,7 +592,7 @@ // x pixel to time var t = this.options.scrollBackwards ? time - this.mouseX * this.options.millisPerPixel - : time - (this.canvas.offsetWidth - this.mouseX) * this.options.millisPerPixel; + : time - (this.clientWidth - this.mouseX) * this.options.millisPerPixel; var data = [];