www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 8ce8e51e728a3ffec1b6f8464b4ef5a6eed38b02
parent 3ce040bb602be02c1f8027e448d6940ef0650fe3
Author: Davide P. Cervone <dpvc@union.edu>
Date:   Fri,  3 May 2013 18:45:58 -0400

Use a count rather than a boolean in checking for a localization restart with the message system so that if multiple typesetting messages (or other messages that reuse their id number) are issued before the localization is loaded, we don't lose the clears.

Diffstat:
Munpacked/MathJax.js | 8++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/unpacked/MathJax.js b/unpacked/MathJax.js @@ -1586,7 +1586,11 @@ MathJax.Message = { } catch (err) { if (!err.restart) {throw err} if (!err.restart.called) { - this.log[n].restarted = true; // mark it so we can tell if the Clear() comes before the message is up + // + // Mark it so we can tell if the Clear() comes before the message is displayed + // + if (this.log[n].restarted == null) {this.log[n].restarted = 0} + this.log[n].restarted++; delete this.log[n].cleared; MathJax.Callback.After(["Set",this,text,n,clearDelay],err.restart); return n; } @@ -1628,7 +1632,7 @@ MathJax.Message = { // if (this.log[n].restarted) { if (this.log[n].cleared) {clearDelay = 0} - delete this.log[n].restarted, this.log[n].cleared; + if (--this.log[n].restarted === 0) {delete this.log[n].cleared} } // // Check if we need to clear the message automatically.