www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 462be1eaeb5c08fdd428f6d548dc508b7c6c8a01
parent 7f509db1b51474a1edf91e15e552d7007d4ab531
Author: Davide P. Cervone <dpvc@union.edu>
Date:   Fri, 25 Apr 2014 17:31:11 -0400

Make sure that <mo> with minsize or maxsize set are stretched.

Diffstat:
Munpacked/jax/output/HTML-CSS/jax.js | 6++++--
Munpacked/jax/output/SVG/jax.js | 3++-
2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/unpacked/jax/output/HTML-CSS/jax.js b/unpacked/jax/output/HTML-CSS/jax.js @@ -1687,7 +1687,7 @@ var h = span.bbox.h, d = span.bbox.d, stretched = false; for (i = 0, m = stretchy.length; i < m; i++) { var bbox = stretchy[i].HTMLspanElement().bbox; - if (bbox.h !== h || bbox.d !== d) + if (stretchy[i].forceStretch || bbox.h !== h || bbox.d !== d) {stretchy[i].HTMLstretchV(span,h,d); stretched = true} } if (stretched) {this.HTMLcomputeBBox(span,true)} @@ -2204,7 +2204,9 @@ else if (under && this === under.CoreMO() && parent.Get("accentunder")) {c = HTMLCSS.FONTDATA.REMAPACCENTUNDER[c]||c} } c = HTMLCSS.FONTDATA.DELIMITERS[c.charCodeAt(0)]; - return (c && c.dir == direction.substr(0,1)); + var stretch = (c && c.dir === direction.substr(0,1)); + this.forceStretch = (stretch && (this.Get("minsize",true) || this.Get("maxsize",true))); + return stretch; }, HTMLstretchV: function (box,h,d) { this.HTMLremoveColor(); diff --git a/unpacked/jax/output/SVG/jax.js b/unpacked/jax/output/SVG/jax.js @@ -904,7 +904,7 @@ { var svg = this.svg[i], mml = svg.mml; if (mml) { - if (mml.SVGdata.h !== this.sh || mml.SVGdata.d !== this.sd) { + if (mml.forceStretch || mml.SVGdata.h !== this.sh || mml.SVGdata.d !== this.sd) { svg = mml.SVGstretchV(this.sh,this.sd); } mml.SVGdata.HW = this.sh; mml.SVGdata.D = this.sd; @@ -1466,6 +1466,7 @@ c = SVG.FONTDATA.DELIMITERS[c.charCodeAt(0)]; var can = (c && c.dir == direction.substr(0,1)); if (!can) {delete this.svg} + this.forceStretch = can && (this.Get("minsize",true) || this.Get("maxsize",true)); return can; }, SVGstretchV: function (h,d) {