Make horizontal lines have minimum lickness of 1px so they don't disappear. Issue #1279.

This commit is contained in:
Davide P. Cervone 2015-10-13 06:15:32 -04:00
parent 0c77e8c880
commit c8ea88e195

View File

@ -1199,8 +1199,9 @@
unEm: function (m) {
return parseFloat(m);
},
Px: function (m) {
Px: function (m,M) {
m *= this.em;
if (M && m < M) m = M;
if (Math.abs(m) < .1) return "0";
return m.toFixed(1).replace(/\.0$/,"")+"px";
},
@ -2404,7 +2405,7 @@
q = (u - nbox.d*nscale) - (a + t/2); if (q < p) u += (p - q);
q = (a - t/2) - (dbox.h*dscale - v); if (q < p) v += (p - q);
frac.style.verticalAlign = CHTML.Em(t/2-v);
num.style.borderBottom = CHTML.Px(t/nscale*nbox.scale)+" solid";
num.style.borderBottom = CHTML.Px(t/nscale*nbox.scale,1)+" solid";
num.className += " MJXc-fpad"; nbox.L = nbox.R = .1;
denom.className += " MJXc-fpad"; dbox.L = dbox.R = .1;
}
@ -2455,7 +2456,7 @@
H = bbox.h + q + t;
var x = this.CHTMLaddRoot(node,sbox,sbox.h+sbox.d-H);
base.style.paddingTop = CHTML.Em(q);
base.style.borderTop = CHTML.Px(T*bbox.scale)+" solid";
base.style.borderTop = CHTML.Px(T*bbox.scale,1)+" solid";
sqrt.style.paddingTop = CHTML.Em(2*t-T); // use wider line, but don't affect height
bbox.h += q + 2*t;
BBOX.combine(sbox,x,H-sbox.h);