Skip to content

Commit

Permalink
Add some short delays between input and output phases or processing s…
Browse files Browse the repository at this point in the history
…o that messages can be udated, and the browser can respond to the user (in case multiple typeset calls are queued simultaneously). Resolves issue mathjax#872.
  • Loading branch information
dpvc committed Aug 19, 2014
1 parent 944e8ad commit 096de75
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions unpacked/MathJax.js
Original file line number Diff line number Diff line change
Expand Up @@ -1902,6 +1902,7 @@ MathJax.Hub = {
inputJax: {}, // mime-type mapped to input jax (by registration)
outputJax: {order:{}}, // mime-type mapped to output jax list (by registration)

processSectionDelay: 50, // pause between input and output phases of processing
processUpdateTime: 250, // time between screen updates when processing math (milliseconds)
processUpdateDelay: 10, // pause between screen updates to allow other processing (milliseconds)

Expand Down Expand Up @@ -2058,11 +2059,15 @@ MathJax.Hub = {
["Post",this.signal,["Begin Math Input",elements,action]],
["processInput",this,state],
["Post",this.signal,["End Math Input",elements,action]],
["Delay",MathJax.Callback,this.processSectionDelay],
["prepareOutput",this,state,"preProcess"],
["Delay",MathJax.Callback,this.processSectionDelay],
["Post",this.signal,["Begin Math Output",elements,action]],
["processOutput",this,state],
["Post",this.signal,["End Math Output",elements,action]],
["Delay",MathJax.Callback,this.processSectionDelay],
["prepareOutput",this,state,"postProcess"],
["Delay",MathJax.Callback,this.processSectionDelay],
["Post",this.signal,["End Math",elements,action]],
["Post",this.signal,["End "+action,elements]]
);
Expand Down

0 comments on commit 096de75

Please sign in to comment.