From e630f1f1f2317f078f5a420dfd6fb6de2f07bcb4 Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Thu, 5 Mar 2015 08:04:18 -0500 Subject: [PATCH] Use original bounding box for CHTMLdimen computations in mpadded. --- unpacked/jax/output/CommonHTML/jax.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/unpacked/jax/output/CommonHTML/jax.js b/unpacked/jax/output/CommonHTML/jax.js index d142fec1e..3c4ddb762 100644 --- a/unpacked/jax/output/CommonHTML/jax.js +++ b/unpacked/jax/output/CommonHTML/jax.js @@ -965,7 +965,8 @@ MML.mpadded.Augment({ toCommonHTML: function (node) { node = this.CHTMLdefaultNode(node,{childNodes:"mjx-block", forceChild:true}); - var child = node.firstChild, cbox = this.CHTMLbboxFor(0), bbox = this.CHTML; + var child = node.firstChild, cbox = this.CHTMLbboxFor(0); + var bbox = MathJax.Hub.Insert({},this.CHTML); // copy to be updated without affecting CHTMLdimen() node = HTML.addElement(node,"mjx-block"); node.appendChild(child); var values = this.getValues("width","height","depth","lspace","voffset"), dimen; if (values.width !== "") { @@ -1001,6 +1002,7 @@ node.style.left = CHTML.Em(dimen.len); } } + this.CHTML = bbox; return node.parentNode; }, CHTMLdimen: function (length,d,m) {