commit bbf543a8403728778753cc72e2876370dd1e995d
parent ed932ec45842075d8ae27aadd35a1f587933096a
Author: Davide P. Cervone <dpvc@union.edu>
Date: Mon, 23 Sep 2013 21:19:04 -0400
Add some comments, and clear the list of DOM elements once we are done with it.
Diffstat:
1 file changed, 6 insertions(+), 0 deletions(-)
diff --git a/unpacked/jax/output/NativeMML/jax.js b/unpacked/jax/output/NativeMML/jax.js
@@ -950,6 +950,11 @@
//
parent.style.width = (math.firstChild.scrollWidth/nMML.ex/nMML.scale).toFixed(3) + "ex";
}
+ //
+ // Firefox gets the widths of <mtd> elements wrong, so run
+ // through them (now that the math is part of the page) and
+ // fix them up. Use ex's so that they print properly (see above).
+ //
for (var i = 0, m = nMML.adjustWidths.length; i < m; i++) {
var tag = nMML.adjustWidths[i];
var style = tag.getAttribute("style") || "";
@@ -959,6 +964,7 @@
tag.setAttribute("style",style+"width:"+width+"ex");
}
}
+ nMML.adjustWidths = []; // clear it so we don't hold onto the DOM elements
}
});