Range slider emits relayout evt on mousemove, should be only on mouseup
I have had the need to do something after the rangeslider had changed (update the min/max somewhere else on the page). I did not find any event that fired only after the slider had been released (a.k.a. mouseup) so I changed the rangeslider/draw.js:
function mouseUp() {
dragCover.removeEventListener('mousemove', mouseMove);
dragCover.removeEventListener('mouseup', mouseUp);
Lib.removeElement(dragCover);
// --> new code
gd.emit('plotly_rangesliderend', {
axis: axisOpts,
opts: opts
// --> end new code
});
Is this anything that would be merged? Should I do a PR?
Hmm. That's interesting. One can already detect range slider updates by listening to plotly_relayout.
Can ask in what context a range-slider-specific event might become useful?
plotly_relayout fires permanentyl during drag (I'd have to debounce). Actually, I oversimplified the example. Based on the range slider of one graph several other graphs get updated, so it would be really bad to be doing that continuously during draging.
plotly_relayout fires permanentyl during drag (I'd have to debounce)
Hmm. That might be a bug here. It should only fire on mouseup (just like regular zoombox dragmoode: 'zoom' interactions).
Does anyone found a workaround for this (until it gets fixed)? I need to know what the range is once mouseup
is there any plans to resolve this bug? Or is there a current workaround??
We need this as well. Using the range slider currently fires too many events.
The bug is still current as of latest Plotly. There is no easy way that I am aware of to:
- prevent relayouts while dragging the rangeslider
- get a callback on mouseup only
Has this been resolved, having the same problem years later! If not, does anyone recommend another library?
Hi, I would also like to see this bug resolved, it would be amazing to add a "debounce" option on the range slider, so that it will only perform an update after mouseup