Range slider emits relayout evt on mousemove, should be only on mouseup
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 18.3k
- Forks
- 2k
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 28
Description
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?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in rangeslider/draw.js at mouseUp and compare it with the mousemove path that emits relayout events. Trace the existing rangeslider event handling and coverage before deciding whether the desired behavior is a changed relayout event or a new end event. Done means the event behavior matches the issue’s mouseup-only requirement.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- data-visualization, frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100