|
1962 | 1962 | (base.movablelimits || base.CoreMO().Get("movablelimits")))
|
1963 | 1963 | {return MML.msubsup.prototype.toSVG.call(this)}
|
1964 | 1964 | var svg = this.SVG(), scale = this.SVGgetScale(svg); this.SVGhandleSpace(svg);
|
1965 |
| - var boxes = [], stretch = [], box, i, m, W = -SVG.BIGDIMEN, WW = W; |
| 1965 | + var boxes = [], stretch = [], box, i, m, W = -SVG.BIGDIMEN, WW = W, ww; |
1966 | 1966 | for (i = 0, m = this.data.length; i < m; i++) {
|
1967 | 1967 | if (this.data[i] != null) {
|
1968 | 1968 | if (i == this.base) {
|
1969 |
| - boxes[i] = this.SVGdataStretched(i,HW,D); |
| 1969 | + box = boxes[i] = this.SVGdataStretched(i,HW,D); |
1970 | 1970 | stretch[i] = (D != null || HW == null) && this.data[i].SVGcanStretch("Horizontal");
|
1971 | 1971 | if (this.data[this.over] && values.accent) {
|
1972 |
| - boxes[i].h = Math.max(boxes[i].h,scale*SVG.TeX.x_height); // min height of 1ex (#1706) |
| 1972 | + box.h = Math.max(box.h,scale*SVG.TeX.x_height); // min height of 1ex (#1706) |
1973 | 1973 | }
|
1974 | 1974 | } else {
|
1975 |
| - boxes[i] = this.data[i].toSVG(); boxes[i].x = 0; delete boxes[i].X; |
| 1975 | + box = boxes[i] = this.data[i].toSVG(); box.x = 0; delete box.X; |
1976 | 1976 | stretch[i] = this.data[i].SVGcanStretch("Horizontal");
|
1977 | 1977 | }
|
1978 |
| - if (boxes[i].w > WW) {WW = boxes[i].w} |
| 1978 | + ww = box.w + box.x + (box.X || 0); |
| 1979 | + if (ww > WW) {WW = ww} |
1979 | 1980 | if (!stretch[i] && WW > W) {W = WW}
|
1980 | 1981 | }
|
1981 | 1982 | }
|
1982 | 1983 | if (D == null && HW != null) {W = HW} else if (W == -SVG.BIGDIMEN) {W = WW}
|
1983 | 1984 | for (i = WW = 0, m = this.data.length; i < m; i++) {if (this.data[i]) {
|
| 1985 | + box = boxes[i]; |
1984 | 1986 | if (stretch[i]) {
|
1985 |
| - boxes[i] = this.data[i].SVGstretchH(W); |
1986 |
| - if (i !== this.base) {boxes[i].x = 0; delete boxes[i].X} |
| 1987 | + box = boxes[i] = this.data[i].SVGstretchH(W); |
| 1988 | + if (i !== this.base) {box.x = 0; delete box.X} |
1987 | 1989 | }
|
1988 |
| - if (boxes[i].w > WW) {WW = boxes[i].w} |
| 1990 | + ww = box.w + box.x + (box.X || 0); |
| 1991 | + if (ww > WW) {WW = ww} |
1989 | 1992 | }}
|
1990 | 1993 | var t = SVG.TeX.rule_thickness * this.mscale;
|
1991 | 1994 | var x, y, z1, z2, z3, dw, k, delta = 0;
|
|
2002 | 2005 | boxes[i].Add(box); boxes[i].Clean();
|
2003 | 2006 | boxes[i].w = -box.l; box = boxes[i];
|
2004 | 2007 | }
|
2005 |
| - dw = {left:0, center:(WW-box.w)/2, right:WW-box.w}[values.align]; |
| 2008 | + ww = box.w + box.x + (box.X || 0); |
| 2009 | + dw = {left:0, center:(WW-ww)/2, right:WW-ww}[values.align]; |
2006 | 2010 | x = dw; y = 0;
|
2007 | 2011 | if (i == this.over) {
|
2008 | 2012 | if (accent) {
|
2009 | 2013 | k = t * scale; z3 = 0;
|
2010 | 2014 | if (base.skew) {
|
2011 | 2015 | x += base.skew; svg.skew = base.skew;
|
2012 |
| - if (x+box.w > WW) {svg.skew += (WW-box.w-x)/2} |
| 2016 | + if (x+ww > WW) {svg.skew += (WW-ww-x)/2} |
2013 | 2017 | }
|
2014 | 2018 | } else {
|
2015 | 2019 | z1 = SVG.TeX.big_op_spacing1 * scale;
|
|
0 commit comments