You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 .
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.
3D scene (like scatter3d) does not preserve its layout when data is updated during user interaction (like dragging) even if uirevision is set to be constant. This makes it really hard to interact with the figure when it updates frequently.
I think it occurs not only with "orbit" and "turntable" but also with "zoom" and "pan".
gvwilson
changed the title
Scatter 3D dragmode turntable loose the camera.eye when a javascript reload, e.g. react, replot, animate.
Scatter 3D dragmode turntable loses the camera.eye on JavaScript reload
Aug 9, 2024
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 .
plotly.js/src/plots/gl3d/scene.js
Line 240 in 35fb5b9
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.
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
The text was updated successfully, but these errors were encountered: