Dragging shape with xref "x2" results in wrong final position
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 18.3k
- Forks
- 2k
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 28
Description
In below codepen that uses plotly.js v2.23.1 is an editable shape attached to x2. When dragging and releasing the shape, it will jump to a new location, it will not stay where it was released.
You can check with newer plotly versions that the bug still exists. I chose the old version just to show that it is an old bug.
I had a brief look at the code and saw that for some reason the shape's xref is changed to 'paper'. This explains the jump, because the coordinates mean something different with xref 'paper'.
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 linked CodePen reproduction using plotly.js v2.23.1 and inspect the shape-drag handling described in the issue. Trace why the shape's xref changes to "paper" during release; done means an editable shape attached to x2 remains at the position where it was released.
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
- 45/100