mirror of
https://github.com/moodle/moodle.git
synced 2025-04-15 05:25:08 +02:00
MDL-43856 MathJax: Delay setting of lang until after MathJax startup
This commit is contained in:
parent
f1dce5734e
commit
16ad61bf55
@ -75,7 +75,10 @@ M.filter_mathjaxloader = M.filter_mathjaxloader || {
|
||||
*/
|
||||
_setLocale: function() {
|
||||
if (!this._configured) {
|
||||
MathJax.Localization.setLocale(this._lang);
|
||||
var lang = this._lang;
|
||||
MathJax.Hub.Queue(function () {
|
||||
MathJax.Localization.setLocale(lang);
|
||||
});
|
||||
MathJax.Hub.Configured();
|
||||
this._configured = true;
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
YUI.add("moodle-filter_mathjaxloader-loader",function(e,t){M.filter_mathjaxloader=M.filter_mathjaxloader||{_lang:"",_configured:!1,configure:function(t){var n=document.createElement("script");n.type="text/x-mathjax-config",n[window.opera?"innerHTML":"text"]=t.mathjaxconfig,document.getElementsByTagName("head")[0].appendChild(n),this._lang=t.lang,e.on(M.core.event.FILTER_CONTENT_UPDATED,this.contentUpdated,this)},_setLocale:function(){this._configured||(MathJax.Localization.setLocale(this._lang),MathJax.Hub.Configured(),this._configured=!0)},typeset:function(){if(!this._configured){var t=this;e.use("mathjax",function(){t._setLocale(),e.all(".filter_mathjaxloader_equation").each(function(e){MathJax.Hub.Queue(["Typeset",MathJax.Hub,e.getDOMNode()])})})}},contentUpdated:function(t){var n=this;e.use("mathjax",function(){n._setLocale(),t.nodes.each(function(e){e.all(".filter_mathjaxloader_equation").each(function(e){MathJax.Hub.Queue(["Typeset",MathJax.Hub,e.getDOMNode()])})})})}}},"@VERSION@",{requires:["moodle-core-event"]});
|
||||
YUI.add("moodle-filter_mathjaxloader-loader",function(e,t){M.filter_mathjaxloader=M.filter_mathjaxloader||{_lang:"",_configured:!1,configure:function(t){var n=document.createElement("script");n.type="text/x-mathjax-config",n[window.opera?"innerHTML":"text"]=t.mathjaxconfig,document.getElementsByTagName("head")[0].appendChild(n),this._lang=t.lang,e.on(M.core.event.FILTER_CONTENT_UPDATED,this.contentUpdated,this)},_setLocale:function(){if(!this._configured){var e=this._lang;MathJax.Hub.Queue(function(){MathJax.Localization.setLocale(e)}),MathJax.Hub.Configured(),this._configured=!0}},typeset:function(){if(!this._configured){var t=this;e.use("mathjax",function(){t._setLocale(),e.all(".filter_mathjaxloader_equation").each(function(e){MathJax.Hub.Queue(["Typeset",MathJax.Hub,e.getDOMNode()])})})}},contentUpdated:function(t){var n=this;e.use("mathjax",function(){n._setLocale(),t.nodes.each(function(e){e.all(".filter_mathjaxloader_equation").each(function(e){MathJax.Hub.Queue(["Typeset",MathJax.Hub,e.getDOMNode()])})})})}}},"@VERSION@",{requires:["moodle-core-event"]});
|
||||
|
@ -75,7 +75,10 @@ M.filter_mathjaxloader = M.filter_mathjaxloader || {
|
||||
*/
|
||||
_setLocale: function() {
|
||||
if (!this._configured) {
|
||||
MathJax.Localization.setLocale(this._lang);
|
||||
var lang = this._lang;
|
||||
MathJax.Hub.Queue(function () {
|
||||
MathJax.Localization.setLocale(lang);
|
||||
});
|
||||
MathJax.Hub.Configured();
|
||||
this._configured = true;
|
||||
}
|
||||
|
@ -73,7 +73,10 @@ M.filter_mathjaxloader = M.filter_mathjaxloader || {
|
||||
*/
|
||||
_setLocale: function() {
|
||||
if (!this._configured) {
|
||||
MathJax.Localization.setLocale(this._lang);
|
||||
var lang = this._lang;
|
||||
MathJax.Hub.Queue(function () {
|
||||
MathJax.Localization.setLocale(lang);
|
||||
});
|
||||
MathJax.Hub.Configured();
|
||||
this._configured = true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user