Load menu and zoom code after typesetting is complete (if not already loaded) so they will be available when needed.
This commit is contained in:
parent
6456a50e52
commit
45c91aa905
File diff suppressed because one or more lines are too long
|
@ -1912,6 +1912,27 @@ MathJax.Hub.Startup = {
|
|||
{setTimeout("document.location = document.location.hash",1)}
|
||||
},
|
||||
|
||||
//
|
||||
// Load the Menu and Zoom code, if it hasn't already been loaded.
|
||||
// This is called after the initial typeset, so should no longer be
|
||||
// competing with other page loads, but will make these available
|
||||
// if needed later on.
|
||||
//
|
||||
MenuZoom: function () {
|
||||
if (!MathJax.Extension.MathMenu) {
|
||||
setTimeout(
|
||||
MathJax.Callback(["Require",MathJax.Ajax,"[MathJax]/extensions/MathMenu.js"]),
|
||||
1000
|
||||
);
|
||||
}
|
||||
if (!MathJax.Extension.MathZoom) {
|
||||
setTimeout(MathJax.Callback(
|
||||
["Require",MathJax.Ajax,"[MathJax]/extensions/MathZoom.js"]),
|
||||
2000
|
||||
);
|
||||
}
|
||||
},
|
||||
|
||||
//
|
||||
// Setup the onload callback
|
||||
//
|
||||
|
@ -2389,6 +2410,7 @@ MathJax.Hub.Startup = {
|
|||
function () {MathJax.isReady = true}, // indicates that MathJax is ready to process math
|
||||
["Typeset",STARTUP],
|
||||
["Hash",STARTUP],
|
||||
["MenuZoom",STARTUP],
|
||||
["Post",STARTUP.signal,"End"]
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user