www

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

commit d74208ef1f60c73e70984bc3182f1784d5a0133b
parent ffd71440e67a8b08e9b339c99a2d1c82d26cd68e
Author: Davide P. Cervone <dpvc@union.edu>
Date:   Thu,  4 Sep 2014 05:56:27 -0400

Merge branch 'node-issue18' into develop.  Issue mathjax/MathJax-node#18.

Diffstat:
Munpacked/jax/output/SVG/jax.js | 15+++++----------
1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/unpacked/jax/output/SVG/jax.js b/unpacked/jax/output/SVG/jax.js @@ -2040,7 +2040,7 @@ var style = svg.element.style; svg.element.setAttribute("width",SVG.Ex(l+svg.w+r)); svg.element.setAttribute("height",SVG.Ex(svg.H+svg.D+2*SVG.em)); - style.verticalAlign = SVG.Ex(-svg.D-3*SVG.em); // remove 2 extra pixels added below plus padding + style.verticalAlign = SVG.Ex(-svg.D-2*SVG.em); // remove extra pixel added below plus padding from above style.marginLeft = SVG.Ex(-l); style.marginRight = SVG.Ex(-r); svg.element.setAttribute("viewBox",SVG.Fixed(-l,1)+" "+SVG.Fixed(-svg.H-SVG.em,1)+" "+ SVG.Fixed(l+svg.w+r,1)+" "+SVG.Fixed(svg.H+svg.D+2*SVG.em,1)); @@ -2048,15 +2048,10 @@ // // If there is extra height or depth, hide that // - if (svg.H > svg.h || svg.D > svg.d) { - var frame = HTML.Element( - "span",{style: {display:"inline-block", "white-space":"nowrap", padding:"1px 0px"}, isMathJax:true},[[ - "span",{style: {display:"inline-block", position:"relative", - width:SVG.Ex(svg.w), height:SVG.Ex(svg.h+svg.d), - "vertical-align":SVG.Ex(-svg.d)}, isMathJax:true}]]); - frame.firstChild.appendChild(svg.element); svg.element = frame; - style.verticalAlign = style.margin = ""; style.position = "absolute"; - style.bottom = SVG.Ex(svg.d-svg.D); style.left = 0; + if (svg.H > svg.h) {style.marginTop = SVG.Ex(svg.h-svg.H)} + if (svg.D > svg.d) { + style.marginBottom = SVG.Ex(svg.d-svg.D); + style.verticalAlign = SVG.Ex(-svg.d); } // // Add it to the MathJax span