Save ex value at the same location as other values

This commit is contained in:
Davide P. Cervone 2011-10-27 08:48:24 -04:00
parent a66c5f2763
commit be653f4e11
9 changed files with 14 additions and 14 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -476,7 +476,7 @@
script = scripts[i]; if (!script.parentNode) continue;
test = script.previousSibling; div = test.previousSibling;
jax = script.MathJax.elementJax;
ex = jax.HTMLCSS.ex = test.firstChild.offsetWidth/60;
ex = test.firstChild.offsetWidth/60;
em = test.lastChild.firstChild.offsetWidth/60;
if (relwidth) {maxwidth = div.previousSibling.firstChild.offsetWidth}
if (ex === 0 || ex === "NaN") {
@ -484,12 +484,12 @@
// (this will cause a reflow for each math element that is hidden)
this.hiddenDiv.appendChild(div);
jax.HTMLCSS.isHidden = true;
ex = jax.HTMLCSS.ex = this.defaultEx; em = this.defaultEm;
ex = this.defaultEx; em = this.defaultEm;
if (relwidth) {maxwidth = this.defaultWidth}
}
scale = Math.floor(Math.max(this.config.minScaleAdjust/100,(ex/this.TeX.x_height)/em) * this.config.scale);
jax.HTMLCSS.scale = scale/100; jax.HTMLCSS.fontSize = scale+"%";
jax.HTMLCSS.em = jax.HTMLCSS.outerEm = em; this.em = em * scale/100;
jax.HTMLCSS.em = jax.HTMLCSS.outerEm = em; this.em = em * scale/100; jax.HTMLCSS.ex = ex;
jax.HTMLCSS.lineWidth = (linebreak ? this.length2em(width,1,maxwidth/this.em) : 1000000);
}
//