|
1706 | 1706 | //
|
1707 | 1707 | CHTMLstretchV: function (h,d) {
|
1708 | 1708 | this.Core().CHTMLstretchV(h,d);
|
1709 |
| - this.toCommonHTML(this.CHTMLnodeElement(),true); |
| 1709 | + this.toCommonHTML(this.CHTMLnodeElement(),{stretch:true}); |
1710 | 1710 | return this.CHTML;
|
1711 | 1711 | },
|
1712 | 1712 | CHTMLstretchH: function (node,w) {
|
1713 | 1713 | this.CHTMLstretchCoreH(node,w);
|
1714 |
| - this.toCommonHTML(node,true); |
| 1714 | + this.toCommonHTML(node,{stretch:true}); |
1715 | 1715 | return this.CHTML;
|
1716 | 1716 | }
|
1717 | 1717 | });
|
|
2044 | 2044 | /********************************************************/
|
2045 | 2045 |
|
2046 | 2046 | MML.mpadded.Augment({
|
2047 |
| - toCommonHTML: function (node,stretch) { |
| 2047 | + toCommonHTML: function (node,options) { |
2048 | 2048 | var child;
|
2049 |
| - if (stretch) { |
| 2049 | + if (options && options.stretch) { |
2050 | 2050 | node = node.firstChild; child = node.firstChild;
|
2051 | 2051 | } else {
|
2052 | 2052 | node = this.CHTMLdefaultNode(node,{childNodes:"mjx-box", forceChild:true});
|
|
2101 | 2101 | /********************************************************/
|
2102 | 2102 |
|
2103 | 2103 | MML.munderover.Augment({
|
2104 |
| - toCommonHTML: function (node,stretch) { |
| 2104 | + toCommonHTML: function (node,options) { |
2105 | 2105 | var values = this.getValues("displaystyle","accent","accentunder","align");
|
2106 | 2106 | var base = this.data[this.base];
|
2107 | 2107 | if (!values.displaystyle && base != null &&
|
|
2110 | 2110 | //
|
2111 | 2111 | // Get the nodes for base and limits
|
2112 | 2112 | //
|
2113 |
| - var under, over, nodes = []; |
2114 |
| - if (stretch) { |
| 2113 | + var under, over, nodes = [], stretch = false; |
| 2114 | + if (options && options.stretch) { |
2115 | 2115 | if (this.data[this.base]) base = CHTML.getNode(node,"mjx-op");
|
2116 | 2116 | if (this.data[this.under]) under = CHTML.getNode(node,"mjx-under");
|
2117 | 2117 | if (this.data[this.over]) over = CHTML.getNode(node,"mjx-over");
|
2118 | 2118 | nodes[0] = base; nodes[1] = under||over; nodes[2] = over;
|
| 2119 | + stretch = true; |
2119 | 2120 | } else {
|
2120 | 2121 | var types = ["mjx-op","mjx-under","mjx-over"];
|
2121 | 2122 | if (this.over === 1) types[1] = types[2];
|
|
2309 | 2310 | /********************************************************/
|
2310 | 2311 |
|
2311 | 2312 | MML.msubsup.Augment({
|
2312 |
| - toCommonHTML: function (node,stretch) { |
| 2313 | + toCommonHTML: function (node,options) { |
2313 | 2314 | var values = this.getValues(
|
2314 | 2315 | "displaystyle","subscriptshift","superscriptshift","texprimestyle"
|
2315 | 2316 | );
|
2316 | 2317 | //
|
2317 | 2318 | // Get the nodes for base and limits
|
2318 | 2319 | //
|
2319 | 2320 | var base, sub, sup;
|
2320 |
| - if (stretch) { |
| 2321 | + if (options && options.stretch) { |
2321 | 2322 | if (this.data[this.base]) base = CHTML.getNode(node,"mjx-base");
|
2322 | 2323 | if (this.data[this.sub]) sub = CHTML.getNode(node,"mjx-sub");
|
2323 | 2324 | if (this.data[this.sup]) sup = CHTML.getNode(node,"mjx-sup");
|
|
2655 | 2656 | /********************************************************/
|
2656 | 2657 |
|
2657 | 2658 | MML.TeXAtom.Augment({
|
2658 |
| - toCommonHTML: function (node,stretch) { |
2659 |
| - if (!stretch) node = this.CHTMLdefaultNode(node); |
| 2659 | + toCommonHTML: function (node,options) { |
| 2660 | + if (!options || !options.stretch) node = this.CHTMLdefaultNode(node); |
2660 | 2661 | if (this.texClass === MML.TEXCLASS.VCENTER) {
|
2661 | 2662 | var a = CHTML.TEX.axis_height, BBOX = this.CHTML;
|
2662 | 2663 | var v = a-(BBOX.h+BBOX.d)/2+BBOX.d;
|
|
2669 | 2670 | },
|
2670 | 2671 | CHTMLstretchV: function (h,d) {
|
2671 | 2672 | this.CHTML.updateFrom(this.Core().CHTMLstretchV(h,d));
|
2672 |
| - this.toCommonHTML(this.CHTMLnodeElement(),true); |
| 2673 | + this.toCommonHTML(this.CHTMLnodeElement(),{stretch:true}); |
2673 | 2674 | return this.CHTML;
|
2674 | 2675 | },
|
2675 | 2676 | CHTMLstretchH: function (node,w) {
|
2676 | 2677 | this.CHTML.updateFrom(this.CHTMLstretchCoreH(node,w));
|
2677 |
| - this.toCommonHTML(node,true); |
| 2678 | + this.toCommonHTML(node,{stretch:true}); |
2678 | 2679 | return this.CHTML;
|
2679 | 2680 | }
|
2680 | 2681 | });
|
|
0 commit comments