plotly / plotly/react-plotly.js

onRelayout does not work with scrollwheel zoom on 3d plots

Aperta
#319 0 commenti 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Lingua principale
JavaScript
Stelle
1.1k
Fork
138
Merge medio
3g 2h
PR unite (30g)
4

Descrizione

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:

  1. 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
  2. zooming in again will output with event.scene.camera.eye.x = 0.94622499477157, a change of ~0.3 inwards
  3. 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

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia con il CodeSandbox collegato e riproduci lo zoom con la rotellina del mouse sul grafico 3D osservando l'output della console di onRelayout. Confronta i valori della camera emessi durante lo zoom avanti, lo zoom indietro e facendo clic prima di scorrere; il lavoro è completato quando l'evento riflette lo stato finale della camera e non è inaspettatamente vuoto.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
javascript, react
Ambito
data-visualization, frontend
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.