plotly / plotly/react-plotly.js
onRelayout does not work with scrollwheel zoom on 3d plots
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- JavaScript
- Sterne
- 1.1k
- Forks
- 138
- Ø Merge
- 3 T. 2 Std.
- Gemergte PRs (30 T.)
- 4
Beschreibung
When using the scroll wheel to zoom, onRelayout seems to output the tiniest initial change rather than the layout at the end of the event (as using Zoom mode and clicking/dragging does), meaning the event better reflects the camera before the action rather than after, e.g:
- zooming in one 'click' of the scroll wheel will output with
event.scene.camera.eye.x = 1.2499999999999998, only a tiny change from the default of 1.25 - zooming in again will output with
event.scene.camera.eye.x = 0.94622499477157, a change of ~0.3 inwards - then zooming out will output with
event.scene.camera.eye.x = 0.7210090673130023, a change of ~0.2 inwards, representing another zoom in rather than out, when in theory we should be back to the position we were in after 1 zoom in
Also, if you click on the plot, then use the scroll wheel to zoom, the onRelayout event will often (but not always) be {}
Example (interact with plot as above and see console logs): https://codesandbox.io/s/compassionate-sara-hl4k9m
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit der verknüpften CodeSandbox und reproduziere den Scrollrad-Zoom im 3D-Plot, während du die Konsolenausgabe von onRelayout beobachtest. Vergleiche die ausgegebenen Kamerawerte beim Hineinzoomen, Herauszoomen und beim Klicken vor dem Scrollen; abgeschlossen ist dies, wenn das Ereignis den endgültigen Kamerazustand widerspiegelt und nicht unerwartet leer ist.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript, react
- Bereich
- data-visualization, frontend
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100