From 2589a1db13b4a385cdbcbb05c83c9e00b178779b Mon Sep 17 00:00:00 2001 From: Chris Amow Date: Sun, 16 Aug 2026 21:56:42 -0500 Subject: [PATCH] vertical drag fix --- static/chart.js | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/static/chart.js b/static/chart.js index a4907d1..c1a5fe3 100644 --- a/static/chart.js +++ b/static/chart.js @@ -189,8 +189,18 @@ class ConfluenceChart { }, }, rightPriceScale: { borderVisible: false }, - handleScale: { pinch: false }, - handleScroll: { horzTouchDrag: false, vertTouchDrag: false }, + handleScale: { + mouseWheel: true, + pinch: false, + axisPressedMouseMove: true, + axisDoubleClickReset: true, + }, + handleScroll: { + mouseWheel: true, + pressedMouseMove: true, + horzTouchDrag: false, + vertTouchDrag: false, + }, // Every price-bearing series shares this scale. A second autoscaled price // axis can place the same numeric price at a different y, which makes // daily context look comparable to intraday price when it is not. @@ -796,6 +806,7 @@ class ConfluenceChart { this.renderAnchorHandles(); this.renderComments(); this.renderContextLabels(); + this.updateCurrentPrice(this.lastCurrentPrice); }; this.touchEndListener = event => { if (event.touches.length < 2 && this.touchTwo) { @@ -1225,8 +1236,18 @@ class ConfluenceChart { armTool(tool) { this.armedTool = tool; this.chart.applyOptions({ - handleScroll: tool ? false : { horzTouchDrag: false, vertTouchDrag: false }, - handleScale: tool ? false : { pinch: false }, + handleScroll: tool ? false : { + mouseWheel: true, + pressedMouseMove: true, + horzTouchDrag: false, + vertTouchDrag: false, + }, + handleScale: tool ? false : { + mouseWheel: true, + pinch: false, + axisPressedMouseMove: true, + axisDoubleClickReset: true, + }, }); this.hideSnapDot(); this.chartEl.classList.toggle('armed', Boolean(tool));