Skip to content

Commit cb9a3ea

Browse files
committed
Fix some bounding box issues with stretchy characters (by making sure bounding box changed proeprly bubble up to inferred rows). Resolves issue #1721.
1 parent afb499f commit cb9a3ea

File tree

1 file changed

+10
-6
lines changed
  • unpacked/jax/output/CommonHTML

1 file changed

+10
-6
lines changed

unpacked/jax/output/CommonHTML/jax.js

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1467,6 +1467,10 @@
14671467
}
14681468
}
14691469
},
1470+
CHTMLupdateFrom: function (bbox) {
1471+
this.CHTML.updateFrom(bbox);
1472+
if (this.inferRow) this.data[0].CHTML.updateFrom(bbox);
1473+
},
14701474

14711475
CHTMLcanStretch: function (direction,H,D) {
14721476
var stretch = false;
@@ -1478,11 +1482,11 @@
14781482
return stretch;
14791483
},
14801484
CHTMLstretchV: function (h,d) {
1481-
this.CHTML.updateFrom(this.Core().CHTMLstretchV(h,d));
1485+
this.CHTMLupdateFrom(this.Core().CHTMLstretchV(h,d));
14821486
return this.CHTML;
14831487
},
14841488
CHTMLstretchH: function (node,w) {
1485-
this.CHTML.updateFrom(this.CHTMLstretchCoreH(node,w));
1489+
this.CHTMLupdateFrom(this.CHTMLstretchCoreH(node,w));
14861490
return this.CHTML;
14871491
},
14881492
CHTMLstretchCoreH: function (node,w) {
@@ -1721,7 +1725,7 @@
17211725
return this.CHTML;
17221726
},
17231727
CHTMLstretchH: function (node,w) {
1724-
this.CHTMLstretchCoreH(node,w);
1728+
this.CHTMLupdateFrom(this.CHTMLstretchCoreH(node,w));
17251729
this.toCommonHTML(node,{stretch:true});
17261730
return this.CHTML;
17271731
}
@@ -2681,12 +2685,12 @@
26812685
return node;
26822686
},
26832687
CHTMLstretchV: function (h,d) {
2684-
this.CHTML.updateFrom(this.Core().CHTMLstretchV(h,d));
2688+
this.CHTMLupdateFrom(this.Core().CHTMLstretchV(h,d));
26852689
this.toCommonHTML(this.CHTMLnodeElement(),{stretch:true});
26862690
return this.CHTML;
26872691
},
26882692
CHTMLstretchH: function (node,w) {
2689-
this.CHTML.updateFrom(this.CHTMLstretchCoreH(node,w));
2693+
this.CHTMLupdateFrom(this.CHTMLstretchCoreH(node,w));
26902694
this.toCommonHTML(node,{stretch:true});
26912695
return this.CHTML;
26922696
}
@@ -2699,7 +2703,7 @@
26992703
node = this.CHTMLcreateNode(node);
27002704
if (this.data[0]) {
27012705
this.data[0].toCommonHTML(node);
2702-
this.CHTML.updateFrom(this.data[0].CHTML);
2706+
this.CHTMLupdateFrom(this.data[0].CHTML);
27032707
this.CHTMLhandleBBox(node);
27042708
}
27052709
return node;

0 commit comments

Comments
 (0)