Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Visibility hidden causing lag issue while rendering #57

Open
monetree opened this issue Feb 22, 2023 · 1 comment
Open

Visibility hidden causing lag issue while rendering #57

monetree opened this issue Feb 22, 2023 · 1 comment

Comments

@monetree
Copy link

monetree commented Feb 22, 2023

			<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.
@anastobe
Copy link

		i reslve my prblem by adding this style

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants