Skip to content

Commit bbf543a

Browse files
committed
Add some comments, and clear the list of DOM elements once we are done with it.
1 parent ed932ec commit bbf543a

File tree

1 file changed

+6
-0
lines changed
  • unpacked/jax/output/NativeMML

1 file changed

+6
-0
lines changed

unpacked/jax/output/NativeMML/jax.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -950,6 +950,11 @@
950950
//
951951
parent.style.width = (math.firstChild.scrollWidth/nMML.ex/nMML.scale).toFixed(3) + "ex";
952952
}
953+
//
954+
// Firefox gets the widths of <mtd> elements wrong, so run
955+
// through them (now that the math is part of the page) and
956+
// fix them up. Use ex's so that they print properly (see above).
957+
//
953958
for (var i = 0, m = nMML.adjustWidths.length; i < m; i++) {
954959
var tag = nMML.adjustWidths[i];
955960
var style = tag.getAttribute("style") || "";
@@ -959,6 +964,7 @@
959964
tag.setAttribute("style",style+"width:"+width+"ex");
960965
}
961966
}
967+
nMML.adjustWidths = []; // clear it so we don't hold onto the DOM elements
962968
}
963969
});
964970

0 commit comments

Comments
 (0)