Merge branch 'node-issue18' into develop. Issue mathjax/MathJax-node#18.
This commit is contained in:
commit
d74208ef1f
|
@ -2040,7 +2040,7 @@
|
||||||
var style = svg.element.style;
|
var style = svg.element.style;
|
||||||
svg.element.setAttribute("width",SVG.Ex(l+svg.w+r));
|
svg.element.setAttribute("width",SVG.Ex(l+svg.w+r));
|
||||||
svg.element.setAttribute("height",SVG.Ex(svg.H+svg.D+2*SVG.em));
|
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);
|
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.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));
|
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 there is extra height or depth, hide that
|
||||||
//
|
//
|
||||||
if (svg.H > svg.h || svg.D > svg.d) {
|
if (svg.H > svg.h) {style.marginTop = SVG.Ex(svg.h-svg.H)}
|
||||||
var frame = HTML.Element(
|
if (svg.D > svg.d) {
|
||||||
"span",{style: {display:"inline-block", "white-space":"nowrap", padding:"1px 0px"}, isMathJax:true},[[
|
style.marginBottom = SVG.Ex(svg.d-svg.D);
|
||||||
"span",{style: {display:"inline-block", position:"relative",
|
style.verticalAlign = SVG.Ex(-svg.d);
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
// Add it to the MathJax span
|
// Add it to the MathJax span
|
||||||
|
|
Loading…
Reference in New Issue
Block a user