Use HTML.Element rather than SVG.Element to make test span. Also, use HUB and HTML variables when possible rather than MathJax.Hub and MathJax.HTML
This commit is contained in:
parent
604c09f9ca
commit
f7116a61ac
File diff suppressed because one or more lines are too long
|
@ -450,9 +450,9 @@
|
||||||
return obj;
|
return obj;
|
||||||
},
|
},
|
||||||
addElement: function (parent,type,def) {return parent.appendChild(this.Element(type,def))},
|
addElement: function (parent,type,def) {return parent.appendChild(this.Element(type,def))},
|
||||||
TextNode: MathJax.HTML.TextNode,
|
TextNode: HTML.TextNode,
|
||||||
addText: MathJax.HTML.addText,
|
addText: HTML.addText,
|
||||||
ucMatch: MathJax.HTML.ucMatch,
|
ucMatch: HTML.ucMatch,
|
||||||
|
|
||||||
HandleVariant: function (variant,scale,text) {
|
HandleVariant: function (variant,scale,text) {
|
||||||
var svg = BBOX.G();
|
var svg = BBOX.G();
|
||||||
|
@ -712,7 +712,7 @@
|
||||||
this.x = this.y = 0; this.scale = 1; this.n = 0;
|
this.x = this.y = 0; this.scale = 1; this.n = 0;
|
||||||
if (this.type) {this.element = SVG.Element(this.type,def)}
|
if (this.type) {this.element = SVG.Element(this.type,def)}
|
||||||
},
|
},
|
||||||
With: function (def) {return MathJax.Hub.Insert(this,def)},
|
With: function (def) {return HUB.Insert(this,def)},
|
||||||
Add: function (svg,dx,dy,forcew,infront) {
|
Add: function (svg,dx,dy,forcew,infront) {
|
||||||
if (dx) {svg.x += dx}; if (dy) {svg.y += dy};
|
if (dx) {svg.x += dx}; if (dy) {svg.y += dy};
|
||||||
if (svg.element) {
|
if (svg.element) {
|
||||||
|
@ -905,7 +905,7 @@
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
MathJax.Hub.Register.StartupHook("mml Jax Ready",function () {
|
HUB.Register.StartupHook("mml Jax Ready",function () {
|
||||||
|
|
||||||
MML = MathJax.ElementJax.mml;
|
MML = MathJax.ElementJax.mml;
|
||||||
|
|
||||||
|
@ -958,7 +958,7 @@
|
||||||
|
|
||||||
SVGgetStyles: function () {
|
SVGgetStyles: function () {
|
||||||
if (this.style) {
|
if (this.style) {
|
||||||
var span = SVG.Element("span");
|
var span = HTML.Element("span");
|
||||||
span.style.cssText = this.style;
|
span.style.cssText = this.style;
|
||||||
if (span.style.fontSize) {this.mathsize = span.style.fontSize}
|
if (span.style.fontSize) {this.mathsize = span.style.fontSize}
|
||||||
if (span.style.color) {this.mathcolor = span.style.color}
|
if (span.style.color) {this.mathcolor = span.style.color}
|
||||||
|
@ -1753,12 +1753,12 @@
|
||||||
// We also need to wait for the onload handler to run, since the loadComplete
|
// We also need to wait for the onload handler to run, since the loadComplete
|
||||||
// will call Config and Startup, which need to modify the body.
|
// will call Config and Startup, which need to modify the body.
|
||||||
//
|
//
|
||||||
MathJax.Hub.Register.StartupHook("onLoad",function () {
|
HUB.Register.StartupHook("onLoad",function () {
|
||||||
setTimeout(MathJax.Callback(["loadComplete",SVG,"jax.js"]),0);
|
setTimeout(MathJax.Callback(["loadComplete",SVG,"jax.js"]),0);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
MathJax.Hub.Register.StartupHook("End Cookie", function () {
|
HUB.Register.StartupHook("End Cookie", function () {
|
||||||
if (HUB.config.menuSettings.zoom !== "None")
|
if (HUB.config.menuSettings.zoom !== "None")
|
||||||
{AJAX.Require("[MathJax]/extensions/MathZoom.js")}
|
{AJAX.Require("[MathJax]/extensions/MathZoom.js")}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue
Block a user