Fix up variable issues identified by packer

This commit is contained in:
Davide P. Cervone 2014-05-07 16:01:13 -04:00
parent ad0d7760f0
commit 1424afb792
5 changed files with 8 additions and 10 deletions

View File

@ -40,7 +40,7 @@
fontCheckTimeout: 15 * 1000, // how long to keep looking for fonts (15 seconds)
});
var MATCH = MathJax.Extension.MatchWebFonts = {
MathJax.Extension.MatchWebFonts = {
version: VERSION,
config: CONFIG
};
@ -81,7 +81,6 @@
for (i = 0, m = scripts.length; i < m; i++) {
script = scripts[i]; if (!script.parentNode) continue; retry = true;
var jax = script.MathJax.elementJax; if (!jax) continue;
var span = document.getElementById(jax.inputID+"-Frame");
//
// Check if ex or mex has changed
//
@ -153,13 +152,12 @@
for (i = 0, m = scripts.length; i < m; i++) {
script = scripts[i]; if (!script.parentNode) continue; retry = true;
var jax = script.MathJax.elementJax; if (!jax) continue;
var span = document.getElementById(jax.inputID+"-Frame");
//
// Check if ex or mex has changed
//
var test = script.previousSibling;
var ex = test.firstChild.offsetHeight/60;
if (ex === 0 || ex === "NaN") {ex = this.defaultEx; em = this.defaultEm}
if (ex === 0 || ex === "NaN") {ex = this.defaultEx}
if (ex !== jax.SVG.ex) {size.push(script); scripts[i] = {}}
}
//
@ -259,7 +257,7 @@
// Check widths of mtd elements
//
if (math.MathJaxMtds) {
for (j = 0, n = math.MathJaxMtds.length; j < n; j++) {
for (var j = 0, n = math.MathJaxMtds.length; j < n; j++) {
if (!math.MathJaxMtds[j].parentNode) continue;
if (newEx || math.MathJaxMtds[j].firstChild.scrollWidth !== jax.mtds[j]) {
jax.mtds[j] = math.MathJaxMtds[j].firstChild.scrollWidth;

View File

@ -258,7 +258,7 @@
overlay.style.display = "";
},
findContainer: function (obj) {
var obj = obj.parentNode;
obj = obj.parentNode;
while (obj.parentNode && obj !== document.body && ZOOM.getOverflow(obj) === "visible")
{obj = obj.parentNode}
return obj;

View File

@ -1721,7 +1721,7 @@
if (!cmd) {TEX.Error(["UnknownEnv","Unknown environment '%1'",env])}
if (!(cmd instanceof Array)) {cmd = [cmd]}
var end = (cmd[1] instanceof Array ? cmd[1][0] : cmd[1]);
mml = STACKITEM.begin().With({name: env, end: end, parse:this});
var mml = STACKITEM.begin().With({name: env, end: end, parse:this});
if (name === "\\end") {
if (!isEnd && cmd[1] instanceof Array && this[cmd[1][1]]) {
mml = this[cmd[1][1]].apply(this,[mml].concat(cmd.slice(2)));

View File

@ -68,7 +68,7 @@ MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () {
this.Append(err); err.toHTML(span); this.data.pop();
span.bbox = err.HTMLspanElement().bbox;
} else {
var mu = this.HTMLgetMu(span), size;
var mu = this.HTMLgetMu(span);
img = HTMLCSS.addElement(span,"img",{isMathJax:true, src:values.src, alt:values.alt, title:values.alt});
if (values.width) {
img.style.width = HTMLCSS.Em(HTMLCSS.length2em(values.width,mu,this.img.img.width/HTMLCSS.em));

View File

@ -570,8 +570,8 @@ MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () {
},
HTMLmoveLine: function (start,end,span,state,values) {
var SPAN = this.HTMLspanElement(), data = SPAN.bbox, base = data,
stack = SPAN.firstChild,dx, BOX = {};
var SPAN = this.HTMLspanElement(), data = SPAN.bbox,
stack = SPAN.firstChild, BOX = {};
if (HTMLCSS.msiePaddingWidthBug) {stack = stack.nextSibling}
var box = stack.firstChild;