Handle order of jax that appear multiple times (properly handle MMLorHTML config)

This commit is contained in:
Davide P. Cervone 2012-03-11 09:50:38 -04:00
parent 93e68cc254
commit 636be43e6a
2 changed files with 4 additions and 3 deletions

File diff suppressed because one or more lines are too long

View File

@ -1862,8 +1862,9 @@ MathJax.Hub.Startup = {
var config = MathJax.Hub.config, jax = MathJax.Hub.outputJax; var config = MathJax.Hub.config, jax = MathJax.Hub.outputJax;
// Save the order of the output jax since they are loading asynchronously // Save the order of the output jax since they are loading asynchronously
for (var i = 0, m = config.jax.length, k = 0; i < m; i++) { for (var i = 0, m = config.jax.length, k = 0; i < m; i++) {
if (config.jax[i].substr(0,7) === "output/") var name = config.jax[i].substr(7);
{jax.order[config.jax[i].substr(7)] = k; k++} if (config.jax[i].substr(0,7) === "output/" && jax.order[name] == null)
{jax.order[name] = k; k++}
} }
var queue = MathJax.Callback.Queue(); var queue = MathJax.Callback.Queue();
return queue.Push( return queue.Push(