plotly / plotly/react-plotly.js
onRelayout does not work with scrollwheel zoom on 3d plots
Ninguém assumiu esta issue ainda.
- Linguagem predominante
- JavaScript
- Estrelas
- 1.1k
- Forks
- 138
- Merge médio
- 3d 2h
- PRs com merge (30d)
- 4
Descrição
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
Guia de contribuição
Nenhum guia de contribuição indexado para este repositório
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Direção de pesquisa
Comece pelo CodeSandbox vinculado e reproduza o zoom com a roda do mouse no gráfico 3D enquanto observa a saída do console de onRelayout. Compare os valores de câmera emitidos ao aumentar o zoom, diminuir o zoom e clicar antes de rolar; está concluído quando o evento reflete o estado final da câmera e não está inesperadamente vazio.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- javascript, react
- Domínio
- data-visualization, frontend
- Tipo de issue
- Bug
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Status de atividade
- Estagnada
- Clareza
- Razoavelmente clara
- Facilidade para iniciantes
- 35/100