Offset of rotating plots

I have a problem when working with plot. Presenting plot on SAGE2 environment in js always shows delay of mouse event. What means when clicking on certain point, rotating 3d plots and then back to the same position, it fails to come back to the origin point and causes some offset.

What is the reason of that and how to work through it? Thank you so much.

I don’t think any plotly.js maintainer has ever tried using plotly.js in SAGE2.

Are there any console errors being logged during the “click/rotate” interaction you’re describing?

Actually there is no errors but the presentation is not good.

Can you share a screenshot and a reproducible example?

Hi,

we are trying the same thing with plot.ly and SAGE2.
First of all, how did you accomplish to pass mouse events to the plot.ly framework in the browser, since normal mouse events are not supported in SAGE2?

Second of all, to answer your question: After digging into the plot.ly source code we found that they use a delta-time for (maybe) acceleration and deceleration purposes which depends on the time the event was received and worked through. This delta-time isn’t always the same and thus you will never end up at the same position where you started. Which is a pain for us since we use multiple screens and the plots are out of sync.

I hope that clarifies this but it’s not a solution.

HI,

For the first problem, we make a mouseevent and do broadcast that is the
function of SAGE app to all the browsers. For some widgets, we just detect
the div information of certain widget and act to that.

For the synchronisation, we also try to use delta-time to rotate the plot,
but it still does not work.

Regards
Qing