diff --git a/unpacked/jax/output/SVG/autoload/multiline.js b/unpacked/jax/output/SVG/autoload/multiline.js index dd786c7bb..bbc878a4c 100644 --- a/unpacked/jax/output/SVG/autoload/multiline.js +++ b/unpacked/jax/output/SVG/autoload/multiline.js @@ -92,7 +92,6 @@ MathJax.Hub.Register.StartupHook("SVG Jax Ready",function () { if (isTop && parent.type !== "mtd") { if (SVG.linebreakWidth < SVG.BIGDIMEN) {svg.w = SVG.linebreakWidth} else {svg.w = SVG.cwidth} - svg.lw = svg.w; } var state = { @@ -212,10 +211,6 @@ MathJax.Hub.Register.StartupHook("SVG Jax Ready",function () { var align = this.SVGgetAlign(state,values), shift = this.SVGgetShift(state,values,align); // - // Add in space for the shift - // - line.x = shift; - // // Set the Y offset based on previous depth, leading, and current height // if (state.n > 0) { @@ -226,8 +221,7 @@ MathJax.Hub.Register.StartupHook("SVG Jax Ready",function () { // // Place the new line // - svg.Align(line,align,0,state.Y); - svg.w = svg.lw; // in case a line extends past the right + svg.Align(line,align,0,state.Y,shift); // // Save the values needed for the future // diff --git a/unpacked/jax/output/SVG/jax.js b/unpacked/jax/output/SVG/jax.js index 172b24114..4df6c3f44 100644 --- a/unpacked/jax/output/SVG/jax.js +++ b/unpacked/jax/output/SVG/jax.js @@ -889,20 +889,9 @@ this.childScale = svg.scale; this.childX = svg.x; this.childY = svg.y; this.n++; return svg; }, - Align: function (svg,align,dx,dy) { + Align: function (svg,align,dx,dy,shift) { dx = ({left: dx, center: (this.w - svg.w)/2, right: this.w - svg.w - dx})[align] || 0; - // - // If we extend to the left of the current contents, - // move the contents to the right and adjust the bounding box - // - if (dx < 0) { - if (this.element.childNodes.length) { - this.element.setAttribute("transform","translate("+Math.floor(-dx)+",0)"); - var g = SVG.Element("g"); g.appendChild(this.element); this.element = g; - } - this.l -= dx; this.w -= dx; this.r -= dx; dx = 0; - } - this.Add(svg,dx,dy); + var w = this.w; this.Add(svg,dx+(shift||0),dy); this.w = w; }, Clean: function () { if (this.h === -SVG.BIGDIMEN) {this.h = this.d = this.l = 0}