You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I also tried bind: { click: ... but that does not do anything at all.
this is for intercepting clicks on legend items (in uPlot's legend, not in Grafana's legend). the whole bind API is designed to allow interception and filtering of events that uPlot itself listens to. uPlot does not actually listen to click events on the plotting area, but to mousedown, mouseup, and dblclick.
ZoomPlugin has changed a bit recently and i've had to work around the fact that the bind API is a singleton. you cannot bind multiple event filters/interceptors to mousedown from different plugins that are loaded at the same time. so here i have to use regular (capturing) listeners to change the drag behavior at the time of mousedown based on modifier key.
we're in the process of re-working all the cursor-related plugins to be a single CursorAction plugin, because there is a bunch of complex state that has to be shared between them and having them isolated from each other (as they are now) is a total clusterfuck because each one needs to avoid stepping on each other's toes with respect to modifier keys, event types handled, etc. when all the plugins are combined, we can then use the bind api to handle all the logic for mousedown and mouseup in a single place that knows the proper context of everything that is possible to do with a cursor.
I'm using uplot in grafana. There's this hook registered in ZoomPlugin
I also wanted to register another hook that reacts on mouse click (while keeping the original hook working).
I registered this before registering
setSelect
hook:which works but also overrides original
setSelect
hook. I also triedbind: { click: ...
but that does not do anything at all.How can I add another hook to react on mouse click?
The text was updated successfully, but these errors were encountered: