Merge branch 'issue391' into develop. Issue #391.
This commit is contained in:
commit
92c1a891dd
|
@ -86,10 +86,13 @@ MathJax.Hub.Register.StartupHook("SVG Jax Ready",function () {
|
|||
//
|
||||
// Start with a fresh SVG element
|
||||
// and make it full width if we are breaking to a specific width
|
||||
// in the top-level math element
|
||||
//
|
||||
svg = this.SVG();
|
||||
if (SVG.linebreakWidth < SVG.BIGDIMEN) {svg.w = SVG.linebreakWidth}
|
||||
else {svg.w = SVG.cwidth/SVG.em * 1000}
|
||||
if (isTop && parent.type !== "mtd") {
|
||||
if (SVG.linebreakWidth < SVG.BIGDIMEN) {svg.w = SVG.linebreakWidth}
|
||||
else {svg.w = SVG.cwidth/SVG.em * 1000}
|
||||
}
|
||||
|
||||
var state = {
|
||||
n: 0, Y: 0,
|
||||
|
|
|
@ -858,6 +858,17 @@
|
|||
},
|
||||
Align: function (svg,align,dx,dy) {
|
||||
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);
|
||||
},
|
||||
Clean: function () {
|
||||
|
|
Loading…
Reference in New Issue
Block a user