plotly / plotly/react-plotly.js
onRelayout does not work with scrollwheel zoom on 3d plots
Personne n'a encore pris cette issue.
- Langage dominant
- JavaScript
- Étoiles
- 1.1k
- Forks
- 138
- Merge moyen
- 3 j 2 h
- PR mergées (30 j)
- 4
Description
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
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Commencez par le CodeSandbox lié et reproduisez le zoom avec la molette sur le graphique 3D tout en observant la sortie de la console de onRelayout. Comparez les valeurs de caméra émises lors d'un zoom avant, d'un zoom arrière et d'un clic avant de faire défiler ; c'est terminé lorsque l'événement reflète l'état final de la caméra et n'est pas vide de manière inattendue.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- javascript, react
- Domaine
- data-visualization, frontend
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100