Revert "fix: mathjax resize on sindow resize (#32606)"

This reverts commit a68fd49103.
This commit is contained in:
leangseu-edx
2023-07-07 14:59:45 -04:00
parent e705820d0d
commit 9dac65a35a
2 changed files with 0 additions and 45 deletions

View File

@@ -81,12 +81,6 @@
<!-- Configure and load MathJax -->
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
styles: {
'.MathJax_SVG>svg': { 'max-width': '100%' },
},
CommonHTML: { linebreaks: { automatic: true } },
SVG: { linebreaks: { automatic: true } },
"HTML-CSS": { linebreaks: { automatic: true } },
tex2jax: {
inlineMath: [
["\\(","\\)"],
@@ -98,18 +92,6 @@
]
}
});
window.addEventListener('resize', MJrenderer);
let 1 = -1;
let delay = 1000;
function MJrenderer() {
if (t >= 0) {
window.clearTimeout(t);
}
t = window.setTimeout(function() {
MathJax.Hub.Queue(["Rerenderer", MathJax.Hub]);
t = -1;
}, delay);
};
</script>
<script type="text/x-mathjax-config">
MathJax.Hub.signal.Interest(function(message) {

View File

@@ -29,12 +29,6 @@
%if mathjax_mode is not Undefined and mathjax_mode == 'wiki':
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
styles: {
'.MathJax_SVG>svg': { 'max-width': '100%', },
},
CommonHTML: { linebreaks: { automatic: true } },
SVG: { linebreaks: { automatic: true } },
"HTML-CSS": { linebreaks: { automatic: true } },
tex2jax: {inlineMath: [ ['$','$'], ["\\(","\\)"]],
displayMath: [ ['$$','$$'], ["\\[","\\]"]]}
});
@@ -42,13 +36,7 @@
%else:
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
styles: {
'.MathJax_SVG>svg': { 'max-width': '100%', },
},
messageStyle: "none",
CommonHTML: { linebreaks: { automatic: true } },
SVG: { linebreaks: { automatic: true } },
"HTML-CSS": { linebreaks: { automatic: true } },
tex2jax: {
inlineMath: [
["\\(","\\)"],
@@ -97,21 +85,6 @@
explorer: true
}
};
window.addEventListener('resize', MJrerender);
let t = -1;
let delay = 1000;
function MJrerender() {
if (t >= 0) {
// If we are still waiting, then the user is still resizing =>
// postpone the action further!
window.clearTimeout(t);
}
t = window.setTimeout(function() {
MathJax.Hub.Queue(["Rerender",MathJax.Hub]);
t = -1; // Reset the handle
}, delay);
};
</script>
<!-- This must appear after all mathjax-config blocks, so it is after the imports from the other templates.