Make mrows that are embellished operators properly include the elements other than the core when stretched. Resolves issue #775.

This commit is contained in:
Davide P. Cervone 2014-09-09 11:27:39 -04:00
parent 82d0ea22c2
commit 871f395ce6

View File

@ -1641,10 +1641,11 @@
MML.mrow.Augment({ MML.mrow.Augment({
SVG: BBOX.ROW, SVG: BBOX.ROW,
toSVG: function () { toSVG: function (h,d) {
this.SVGgetStyles(); this.SVGgetStyles();
var svg = this.SVG(); var svg = this.SVG();
this.SVGhandleSpace(svg); this.SVGhandleSpace(svg);
if (d != null) {this.sh = h; this.sd = d}
for (var i = 0, m = this.data.length; i < m; i++) for (var i = 0, m = this.data.length; i < m; i++)
{if (this.data[i]) {svg.Check(this.data[i])}} {if (this.data[i]) {svg.Check(this.data[i])}}
svg.Stretch(); svg.Clean(); svg.Stretch(); svg.Clean();
@ -1664,13 +1665,15 @@
}, },
SVGmultiline: function (span) {MML.mbase.SVGautoloadFile("multiline")}, SVGmultiline: function (span) {MML.mbase.SVGautoloadFile("multiline")},
SVGstretchH: function (w) { SVGstretchH: function (w) {
var svg = this.data[this.core].SVGstretchH(w); var svg = this.SVG(), child;
this.SVGhandleColor(svg); this.SVGhandleSpace(svg);
this.SVGsaveData(svg); for (var i = 0, m = this.data.length; i < m; i++) {
return svg; if (!this.data[i]) continue;
}, if (i === this.core) {child = this.data[i].SVGstretchH(w)}
SVGstretchV: function (h,d) { else {child = this.data[i].toSVG()}
var svg = this.data[this.core].SVGstretchV(h,d); svg.Add(child,svg.w,0);
}
svg.Clean();
this.SVGhandleColor(svg); this.SVGhandleColor(svg);
this.SVGsaveData(svg); this.SVGsaveData(svg);
return svg; return svg;