plotly / plotly/plotly.js

Dragging shape with xref "x2" results in wrong final position

Offen
#7,472 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

bug P1
Vorherrschende Sprache
JavaScript
Sterne
18.3k
Forks
2k
Ø Merge
2 T. 12 Std.
Gemergte PRs (30 T.)
28

Beschreibung

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'.

https://codepen.io/toffi-fee/pen/Byoormr

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne mit der verlinkten CodePen-Reproduktion unter Verwendung von plotly.js v2.23.1 und untersuche die im Issue beschriebene Behandlung des Shape-Drag-Vorgangs. Verfolge, warum sich der xref des Shapes während des Loslassens in "paper" ändert; abgeschlossen ist die Aufgabe, wenn ein editierbares Shape, das an x2 gebunden ist, an der Position bleibt, an der es losgelassen wurde.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
javascript
Bereich
data-visualization
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.