Properly handle width of border and padding in merrors in HTML-CSS output

This commit is contained in:
Davide P. Cervone 2012-01-09 11:58:19 -05:00
parent dceb91e4ea
commit e4089cfd6e
6 changed files with 19 additions and 5 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1936,6 +1936,20 @@
return span;
}
});
MML.merror.Augment({
toHTML: function (span) {
//
// Width doesn't include padding and border, so use an extra inline block
// element to capture it.
//
var SPAN = MathJax.HTML.addElement(span,"span",{style:{display:"inline-block"}});
span = this.SUPER(arguments).toHTML.call(this,SPAN);
var HD = HTMLCSS.getHD(SPAN), W = HTMLCSS.getW(SPAN);
SPAN.bbox = {h:HD.h, d:HD.d, w:W, lw:0, rw:W, exactW: true};
SPAN.id = span.id; span.id = null;
return SPAN;
}
});
MML.ms.Augment({toHTML: MML.mbase.HTMLautoload});