react-native-mathjax icon indicating copy to clipboard operation
react-native-mathjax copied to clipboard

Visibility hidden causing lag issue while rendering

Open monetree opened this issue 2 years ago • 1 comments

			<script type=“text/x-mathjax-config”>
				MathJax.Hub.Config(${options});
				MathJax.Hub.Queue(function() {
					var height = document.documentElement.scrollHeight;
					window.ReactNativeWebView.postMessage(String(height));
					document.getElementById(“formula”).style.visibility = ‘’;
				});
			</script>
			<script src=“https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js”></script>
			<div id=“formula” style=“line-height: 1.7;“>
				${content}
</div>```
			




Please replace the code in index.js file with the above snippet to solve the lag problem. 
remove visibility hidden style and add a line-height of 1.7 (for better line spacing) to prevent the lag.

monetree avatar Feb 22 '23 19:02 monetree

anastobe avatar Apr 16 '24 09:04 anastobe