vertical drag fix

This commit is contained in:
Chris Amow 2026-08-16 21:56:42 -05:00
parent 171521cf75
commit 2589a1db13

View file

@ -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));