Merge pull request #1590 from dpvc/issue1555

Set previews to have display:none.  #1555
This commit is contained in:
Davide P. Cervone 2016-08-24 09:43:57 -04:00 committed by GitHub
commit 62e8298223
5 changed files with 15 additions and 3 deletions

View File

@ -2307,7 +2307,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
//
@ -2391,7 +2394,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

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

View File

@ -764,7 +764,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

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