Skip to content

Commit 14980f0

Browse files
committed
Fix width of roots in CHTML when they contain linebreaks. Resolves issue #1882.
1 parent af09e53 commit 14980f0

File tree

1 file changed

+7
-1
lines changed
  • unpacked/jax/output/CommonHTML

1 file changed

+7
-1
lines changed

unpacked/jax/output/CommonHTML/jax.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2632,13 +2632,19 @@
26322632
BBOX.clean();
26332633
return node;
26342634
},
2635-
CHTMLaddRoot: function () {return 0}
2635+
CHTMLaddRoot: function () {return 0},
2636+
CHTMLhandleBBox: function (node) {
2637+
var bbox = this.CHTMLbboxFor(0);
2638+
delete bbox.pwidth;
2639+
this.SUPER(arguments).CHTMLhandleBBox.apply(this,arguments);
2640+
}
26362641
});
26372642

26382643
/********************************************************/
26392644

26402645
MML.mroot.Augment({
26412646
toCommonHTML: MML.msqrt.prototype.toCommonHTML,
2647+
CHTMLhandleBBox: MML.msqrt.prototype.CHTMLhandleBBox,
26422648
CHTMLaddRoot: function (sqrt,sbox,d) {
26432649
if (!this.data[1]) return;
26442650
var BBOX = this.CHTML, bbox = this.data[1].CHTML, root = sqrt.firstChild;

0 commit comments

Comments
 (0)