MathJax: Fix scale causing equations to not be aligned.

See https://github.com/mathjax/MathJax/issues/1422
This commit is contained in:
Kovid Goyal 2016-03-27 08:24:06 +05:30
parent ac2d7ccbcf
commit 1a38f03966

View File

@ -249,7 +249,7 @@
test = script.previousSibling; div = test.previousSibling;
jax = script.MathJax.elementJax; if (!jax) continue;
ex = test.firstChild.offsetHeight/60;
cwidth = div.previousSibling.firstChild.offsetWidth;
cwidth = div.previousSibling.firstChild.offsetWidth / this.config.scale * 100;
if (relwidth) {maxwidth = cwidth}
if (ex === 0 || ex === "NaN") {
// can't read width, so move to hidden div for processing