Skip to content

Plots with Latex jump after pan with recent versions of MathJax #3006

Closed
@jonmmease

Description

@jonmmease

In the course of working to improve the experience of using the Plotly.js Latex support from plotly.py inside the Jupyter notebook, I've isolated an odd behavior with recent versions of MathJax.

The Plotly.js repo includes a copy of MathJax 2.3.0 in the dist/extras/mathjax directory and this version is used for testing and in the development dashboard.

CodePen: https://codepen.io/anon/pen/ZMRWqX?editors=1010

Here's what zoom/pan interactions look like on a plot with a LaTeX title using MathJax 2.3.0 (this is from Chrome):

mathjax_2 3

And here's what happens using MathJax 2.7.0. There is a noticeable flash at the conclusion of the pan event, during which the trace returns to its pre-drag screen position (though the axes and grid lines don't move) and the title disappears. After a moment the title reappears and the trace returns to its dragged location.

mathjax_2 7

I'd like to dig into this some more, as it's a somewhat distracting artifact that will show up when using latex in the Jupyter notebook once #2994 (comment) is resolved.

I'm guessing this has something to do with the interplay between the async nature of both Plotly.js and MathJax. Any suggestions on where to start?

Metadata

Metadata

Assignees

Labels

bugsomething broken

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions