Skip to content

Commit fe0d977

Browse files
committed
Handle padding in measured children when noReflows is used (e.g., in maction tags around operators).
1 parent 49c3e3a commit fe0d977

File tree

1 file changed

+7
-1
lines changed
  • unpacked/jax/output/HTML-CSS

1 file changed

+7
-1
lines changed

unpacked/jax/output/HTML-CSS/jax.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -892,8 +892,14 @@
892892
return HD;
893893
},
894894
getW: function (span) {
895-
if (span.bbox && this.config.noReflows && span.bbox.exactW !== false) {return span.bbox.w}
896895
var W, H, w = (span.bbox||{}).w, start = span;
896+
if (span.bbox && this.config.noReflows && span.bbox.exactW !== false) {
897+
if (!span.bbox.exactW) {
898+
if (span.style.paddingLeft) w += this.unEm(span.style.paddingLeft)*(span.scale||1);
899+
if (span.style.paddingRight) w += this.unEm(span.style.paddingRight)*(span.scale||1);
900+
}
901+
return w;
902+
}
897903
if (span.bbox && span.bbox.exactW) {return w}
898904
if ((span.bbox && w >= 0 && !this.initialSkipBug && !this.msieItalicWidthBug) ||
899905
this.negativeBBoxes || !span.firstChild) {

0 commit comments

Comments
 (0)