leeoniya / uPlot

📈 A small, fast chart for time series, lines, areas, ohlc & bars
MIT License
8.83k stars 386 forks source link

detect setScale hook triggered by left mouse drag #1000

Closed RonnieLincoln closed 2 months ago

RonnieLincoln commented 2 months ago

Hi,

SetScale hook is triggered by setData, setScale, mouse drag, double click.

Is there any way to know it exactly from mouse drag?

:)

RonnieLincoln commented 2 months ago

by the way, I am using v1.6.17

RonnieLincoln commented 2 months ago

Solved it by setting a mark in cursor.bind.mouseup MouseListenerFactory .

leeoniya commented 2 months ago

you can add a setSelect hook and set some viaDrag = true flag in there. this will be triggered before setScale hooks.