Use scale of 1 if bbox.scale is not set (affects fractions, for example). Resolves issue #1072.

This commit is contained in:
Davide P. Cervone 2015-06-29 09:54:37 -04:00
parent a154d7ded1
commit ca6ffc7b41

View File

@ -137,14 +137,14 @@ MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () {
var w = box[k+1].bbox.w - box[k].bbox.w;
if (w > 0) {
if (isPre) {
box[k].style.paddingLeft = HTMLCSS.Em(w/box[k].scale);
box[k].style.paddingLeft = HTMLCSS.Em(w/(box[k].scale||1));
BOX[k].w += w;
} else {
HTMLCSS.createBlank(sub,w);
}
} else if (w < 0) {
if (isPre) {
box[k+1].style.paddingLeft = HTMLCSS.Em(-w/box[k+1].scale);
box[k+1].style.paddingLeft = HTMLCSS.Em(-w/(box[k+1].scale||1));
BOX[k+1].w += -w;
} else {
HTMLCSS.createBlank(sup,-w);