commit 015c36ef8410c7fa88a661bf3fa1f483c71fc51c
parent 47163b5c709d86a74ebc988356d4585dbb0099f0
Author: Davide P. Cervone <dpvc@union.edu>
Date: Thu, 8 Oct 2015 20:45:41 -0400
Merge branch 'issue1278' into develop. Issue #1278.
Diffstat:
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/unpacked/jax/output/CommonHTML/jax.js b/unpacked/jax/output/CommonHTML/jax.js
@@ -2527,9 +2527,17 @@
MML.mrow.Augment({
toCommonHTML: function (node) {
node = this.CHTMLdefaultNode(node);
- var bbox = this.CHTML, H = bbox.h, D = bbox.d;
- for (var i = 0, m = this.data.length; i < m; i++) this.CHTMLstretchChildV(i,H,D);
- if (this.CHTMLlineBreaks()) this.CHTMLmultiline(node);
+ var bbox = this.CHTML, H = bbox.h, D = bbox.d, hasNegative;
+ for (var i = 0, m = this.data.length; i < m; i++) {
+ this.CHTMLstretchChildV(i,H,D);
+ if (this.data[i] && this.data[i].CHTML && this.data[i].CHTML.w < 0) hasNegative = true;
+ }
+ if (this.CHTMLlineBreaks()) {
+ this.CHTMLmultiline(node);
+ } else {
+ if (hasNegative && bbox.w) node.style.width = CHTML.Em(Math.max(0,bbox.w));
+ if (bbox.w < 0) node.style.marginRight = CHTML.Em(bbox.w);
+ }
return node;
},
CHTMLlineBreaks: function () {