Set previews to have display:none. Resolves issue #1555.

This commit is contained in:
Davide P. Cervone 2016-08-21 09:32:00 -04:00
parent 4a9bee1f2f
commit 9775358fec
5 changed files with 15 additions and 3 deletions

View File

@ -2306,7 +2306,10 @@ MathJax.Hub = {
result = MathJax.OutputJax[jax.outputJax].Process(script,state);
if (result !== false) {
script.MathJax.state = STATE.PROCESSED;
if (script.MathJax.preview) {script.MathJax.preview.innerHTML = ""}
if (script.MathJax.preview) {
script.MathJax.preview.innerHTML = "";
script.MathJax.preview.style.display = "none";
}
//
// Signal that new math is available
//
@ -2390,7 +2393,10 @@ MathJax.Hub = {
var node = document.getElementById(error.id);
if (node) node.parentNode.removeChild(node);
if (script.parentNode) script.parentNode.insertBefore(error,script);
if (script.MathJax.preview) {script.MathJax.preview.innerHTML = ""}
if (script.MathJax.preview) {
script.MathJax.preview.innerHTML = "";
script.MathJax.preview.style.display = "none";
}
//
// Save the error for debugging purposes
// Report the error as a signal

View File

@ -603,6 +603,7 @@
//
if (data.preview) {
data.preview.innerHTML = "";
data.preview.style.display = "none";
script.MathJax.preview = data.preview;
delete data.preview;
}

View File

@ -765,7 +765,10 @@
if (script && script.parentNode && script.MathJax.elementJax) {
var div = (script.MathJax.elementJax.HTMLCSS||{}).div;
if (div) {div.className = div.className.split(/ /)[0]}
if (script.MathJax.preview) {script.MathJax.preview.innerHTML = ""}
if (script.MathJax.preview) {
script.MathJax.preview.innerHTML = "";
script.MathJax.preview.style.display = "none";
}
}
}
//

View File

@ -268,6 +268,7 @@
//
if (data.preview) {
data.preview.innerHTML = "";
data.preview.style.display = "none";
script.MathJax.preview = data.preview;
delete data.preview;
}

View File

@ -386,6 +386,7 @@
//
if (data.preview) {
data.preview.innerHTML = "";
data.preview.style.display = "none";
script.MathJax.preview = data.preview;
delete data.preview;
}