Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

onRelayout does not work with scrollwheel zoom on 3d plots #319

Open
who-knows-who opened this issue May 2, 2023 · 0 comments
Open

onRelayout does not work with scrollwheel zoom on 3d plots #319

who-knows-who opened this issue May 2, 2023 · 0 comments

Comments

@who-knows-who
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant