Scatter 3D dragmode turntable loses the camera.eye on JavaScript reload
Nessuno ha ancora preso questa issue.
- Lingua principale
- JavaScript
- Stelle
- 18.3k
- Fork
- 2k
- Merge medio
- 2g 12h
- PR unite (30g)
- 28
Descrizione
Scatter 3D dragmode "orbit" and "turntable" moves camera.eye but it is not reflected to layout.schene.camera.eye of the frame. It will be saved just after mouse click event or wheel, through relayoutCallback > scene.saveLayout .
https://github.com/plotly/plotly.js/blob/35fb5b918e3dbdc3cc6e3b9735c8003008376020/src/plots/gl3d/scene.js#L240
If replot, react, animate and so on, happens during mouse move and mouse up, replot uses layout.schene.camera.eye saved BEFORE and overwrite.
It can reploduced in https://halueda.github.io/wavy-orbitals/ .
Its color is chaneged once a second and you can only rotate 3d-axis if mouse move is in 1 second, during color change.
To solve this, there seems two ways.
- every mouse move event do scene.saveLayout. It may cause performance impact.
- replot function do scene.saveLayout if the plot is 3d.
Perhaps more genral way should be used. For example, mouse moving event set into something like pending events and replot-api executes all pending events prior to real replot. As well as, scene.saveLayout clears the pending event.
This issue can be related to:
#5500
#5005
#5560
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia da src/plots/gl3d/scene.js intorno alla riga 240 e riproduci la perdita dello stato della fotocamera nell’esempio collegato wavy-orbitals mentre gli aggiornamenti del colore attivano dei replot. Traccia relayoutCallback, scene.saveLayout e il percorso di replot. Il lavoro è completato quando le modifiche a camera.eye della fotocamera orbit o turntable persistono durante un replot, react o un’animazione mentre si muove il mouse, senza sovrascrivere la vista corrente.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- javascript
- Ambito
- data-visualization
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100