Double click to zoom out alternates between ranges
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 18.3k
- Forks
- 2k
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 28
Description
Double click to reset zoom when an axis range is specified causes the double click zoom out behavior to alternate between the specified range and fully zoomed out on subsequent double clicks.
Reproduction
- Create new plot with a trace using Plotly.newPlot
- Specify a layout where at least one axis has a range specified
- Double click to fully zoom out
- Double click again to zoom back in to the specified range
See: https://codepen.io/Kurappu/pen/jOxpMvj
Expected
Double clicking to zoom out multiple times should not alternate between zoom states (step 4 above should result in nothing happening)
Possibly related issues
#2957, which got merged with #2718
While they touch on few related points, they don't seem to mention anything about the alternating issue I'm experiencing.
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 with the CodePen reproduction and the double-click zoom handling reached from Plotly.newPlot when a layout axis has an explicit range. Verify the repeated double-click sequence against the expected behavior: after fully zooming out, another double click should do nothing rather than restore the specified range.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100