calvinkei / react-native-mathjax

Render Mathjax content in React Native Webview
MIT License
34 stars 37 forks source link

Hiding content until typesetting is complete #12

Closed mrded closed 6 years ago

mrded commented 6 years ago

It is not unusual for the original text to be visible before MathJax processes it. If MathJax needs to load any components (like its output jax the first time it is used), that is done asynchronously, so the page will be displayed in the meantime until the component is loaded.

You could set the div's visibility:hidden property before loading its contents, and then after it is loaded, typeset the math setting visibility to "" afterward. You would need to use the MathJax.Hub.Queue to synchronize that.