www

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

commit 74e054397c63dfd04e23976340ede0ae365e3ee2
parent 8de643d6199d9a931a04fe78e55246f215622196
Author: Davide P. Cervone <dpvc@union.edu>
Date:   Sun,  1 Mar 2015 18:04:23 -0500

Give mpadded elements the correct bbox.

Diffstat:
Munpacked/jax/output/CommonHTML/jax.js | 7++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/unpacked/jax/output/CommonHTML/jax.js b/unpacked/jax/output/CommonHTML/jax.js @@ -942,7 +942,7 @@ MML.mpadded.Augment({ toCommonHTML: function (node) { node = this.CHTMLdefaultNode(node,{childNodes:"mjx-block", forceChild:true}); - var child = node.firstChild, cbox = this.CHTMLbboxFor(0); + var child = node.firstChild, cbox = this.CHTMLbboxFor(0), bbox = this.CHTML; node = HTML.addElement(node,"mjx-block"); node.appendChild(child); var values = this.getValues("width","height","depth","lspace","voffset"), dimen; if (values.width !== "") { @@ -950,16 +950,17 @@ if (dimen.pm) dimen.len += cbox.w; if (dimen.len < 0) dimen.len = 0; if (dimen.len !== cbox.w) node.style.width = CHTML.Em(dimen.len); + bbox.w = dimen.len; } if (values.height !== "") { dimen = this.CHTMLdimen(values.height,"h",0); - if (!dimen.pm) dimen.len += -cbox.h; + if (dimen.pm) {bbox.h += dimen.len} else {bbox.h = dimen.len; dimen.len += -cbox.h} if (dimen.len+cbox.h < 0) dimen.len = -cbox.h; if (dimen.len) child.style.marginTop = CHTML.Em(dimen.len); } if (values.depth !== "") { dimen = this.CHTMLdimen(values.depth,"d",0); - if (!dimen.pm) dimen.len += -cbox.d; + if (dimen.pm) {bbox.d += dimen.len} else {bbox.d = dimen.len; dimen.len += -cbox.d} if (dimen.len+cbox.d < 0) dimen.len = -cbox.d; if (dimen.len) child.style.marginBottom = CHTML.Em(dimen.len); }