Merge branch 'menu-patch' into develop
This commit is contained in:
commit
d0ecea125f
|
@ -1896,6 +1896,8 @@ MathJax.Hub = {
|
|||
mpContext: false, // true means pass menu events to MathPlayer in IE
|
||||
mpMouse: false, // true means pass mouse events to MathPlayer in IE
|
||||
texHints: true, // include class names for TeXAtom elements
|
||||
FastPreview: true, // use PreviewHTML output as preview?
|
||||
assistiveMML: true, // include hidden MathML for screen readers?
|
||||
inTabOrder: true, // set to false if math elements should be included in the tabindex
|
||||
semantics: false // add semantics tag with original form in MathML output
|
||||
},
|
||||
|
@ -2127,6 +2129,7 @@ MathJax.Hub = {
|
|||
if (script.MathJax.state !== STATE.PENDING) {this.scriptAction[action](script)}
|
||||
}
|
||||
if (!script.MathJax) {script.MathJax = {state: STATE.PENDING}}
|
||||
if (script.MathJax.error) delete script.MathJax.error;
|
||||
if (script.MathJax.state !== STATE.PROCESSED) {state.scripts.push(script)}
|
||||
}
|
||||
}
|
||||
|
@ -2350,7 +2353,8 @@ MathJax.Hub = {
|
|||
if (err.line||err.lineNumber) message += "\n"+LOCALIZE("ErrorLine","line: %1",err.line||err.lineNumber);
|
||||
message += "\n\n"+LOCALIZE("ErrorTips","Debugging tips: use %1, inspect %2 in the browser console","'unpacked/MathJax.js'","'MathJax.Hub.lastError'");
|
||||
script.MathJax.error = MathJax.OutputJax.Error.Jax(message,script);
|
||||
|
||||
if (script.MathJax.elementJax)
|
||||
script.MathJax.error.inputID = script.MathJax.elementJax.inputID;
|
||||
//
|
||||
// Create the [Math Processing Error] span
|
||||
//
|
||||
|
@ -2359,28 +2363,23 @@ MathJax.Hub = {
|
|||
var error = MathJax.HTML.Element("span", {
|
||||
className:"MathJax_Error", jaxID:"Error", isMathJax:true,
|
||||
id: script.MathJax.error.inputID+"-Frame"
|
||||
},errorText);
|
||||
},[["span",null,errorText]]);
|
||||
//
|
||||
// Attach the menu events
|
||||
//
|
||||
if (MathJax.Extension.MathEvents) {
|
||||
var EVENT = MathJax.Extension.MathEvents.Event;
|
||||
MathJax.Ajax.Require("[MathJax]/extensions/MathEvents.js",function () {
|
||||
var EVENT = MathJax.Extension.MathEvents.Event
|
||||
HUB = MathJax.Hub;
|
||||
error.oncontextmenu = EVENT.Menu;
|
||||
error.onmousedown = EVENT.Mousedown;
|
||||
error.onkeydown = EVENT.Keydown;
|
||||
error.tabIndex = this.getTabOrder(this.getJaxFor(script));
|
||||
} else {
|
||||
MathJax.Ajax.Require("[MathJax]/extensions/MathEvents.js",function () {
|
||||
var EVENT = MathJax.Extension.MathEvents.Event;
|
||||
error.oncontextmenu = EVENT.Menu;
|
||||
error.onmousedown = EVENT.Mousedown;
|
||||
error.keydown = EVENT.Keydown;
|
||||
error.tabIndex = this.getTabOrder(this.getJaxFor(script));
|
||||
});
|
||||
}
|
||||
error.tabIndex = HUB.getTabOrder(HUB.getJaxFor(script));
|
||||
});
|
||||
//
|
||||
// Insert the error into the page and remove any preview
|
||||
//
|
||||
var node = document.getElementById(error.id);
|
||||
if (node) node.parentNode.removeChild(node);
|
||||
script.parentNode.insertBefore(error,script);
|
||||
if (script.MathJax.preview) {script.MathJax.preview.innerHTML = ""}
|
||||
//
|
||||
|
|
|
@ -240,12 +240,17 @@ MathJax.Hub.Config({
|
|||
ALT: false, // require Alt or Option?
|
||||
CMD: false, // require CMD?
|
||||
Shift: false, // require Shift?
|
||||
discoverable: false, // make math menu discoverable on hover?
|
||||
zscale: "200%", // the scaling factor for MathZoom
|
||||
renderer: "", // set when Jax are loaded
|
||||
font: "Auto", // what font HTML-CSS should use
|
||||
context: "MathJax", // or "Browser" for pass-through to browser menu
|
||||
locale: "en", // the language to use for messages
|
||||
mpContext: false, // true means pass menu events to MathPlayer in IE
|
||||
mpMouse: false, // true means pass mouse events to MathPlayer in IE
|
||||
texHints: true, // include class names for TeXAtom elements
|
||||
FastPreview: true, // use PreviewHTML output as preview?
|
||||
assistiveMML: true, // include hidden MathML for screen readers?
|
||||
inTabOrder: true, // set to true if math elements should be included in the tabindex
|
||||
semantics: false // add semantics tag with original form in MathML output
|
||||
},
|
||||
|
|
|
@ -1543,16 +1543,16 @@
|
|||
),
|
||||
ITEM.RULE(),
|
||||
ITEM.SUBMENU(["Renderer","Math Renderer"], {hidden:!CONFIG.showRenderer},
|
||||
ITEM.RADIO("HTML-CSS", "renderer", {action: MENU.Renderer}),
|
||||
ITEM.RADIO("Common HTML","renderer", {action: MENU.Renderer, value:"CommonHTML"}),
|
||||
ITEM.RADIO("Fast HTML", "renderer", {action: MENU.Renderer, value:"PreviewHTML"}),
|
||||
ITEM.RADIO("MathML", "renderer", {action: MENU.Renderer, value:"NativeMML"}),
|
||||
ITEM.RADIO("SVG", "renderer", {action: MENU.Renderer}),
|
||||
ITEM.RADIO("PlainSource","renderer", {action: MENU.Renderer, value:"PlainSource"}),
|
||||
ITEM.RADIO(["HTML-CSS","HTML-CSS"], "renderer", {action: MENU.Renderer}),
|
||||
ITEM.RADIO(["CommonHTML","Common HTML"], "renderer", {action: MENU.Renderer, value:"CommonHTML"}),
|
||||
ITEM.RADIO(["PreviewHTML","Preview HTML"],"renderer", {action: MENU.Renderer, value:"PreviewHTML"}),
|
||||
ITEM.RADIO(["MathML","MathML"], "renderer", {action: MENU.Renderer, value:"NativeMML"}),
|
||||
ITEM.RADIO(["SVG","SVG"], "renderer", {action: MENU.Renderer}),
|
||||
ITEM.RADIO(["PlainSource","Plain Source"],"renderer", {action: MENU.Renderer, value:"PlainSource"}),
|
||||
ITEM.RULE(),
|
||||
ITEM.CHECKBOX("Fast Preview", "FastPreview"),
|
||||
ITEM.CHECKBOX("Assistive MathML", "assistiveMML", {action:MENU.AssistiveMML}),
|
||||
ITEM.CHECKBOX("Include in Tab Order", "inTabOrder")
|
||||
ITEM.CHECKBOX(["FastPreview","Fast Preview"], "FastPreview"),
|
||||
ITEM.CHECKBOX(["AssistiveMML","Assistive MathML"], "assistiveMML", {action:MENU.AssistiveMML}),
|
||||
ITEM.CHECKBOX(["InTabOrder","Include in Tab Order"], "inTabOrder")
|
||||
),
|
||||
ITEM.SUBMENU("MathPlayer", {hidden:!HUB.Browser.isMSIE || !CONFIG.showMathPlayer,
|
||||
disabled:!HUB.Browser.hasMathPlayer},
|
||||
|
@ -1579,7 +1579,7 @@
|
|||
ITEM.RADIO(["NeoEulerWeb","Neo Euler (web)"], "font", {action: MENU.Font})
|
||||
),
|
||||
ITEM.SUBMENU(["ContextMenu","Contextual Menu"], {hidden:!CONFIG.showContext},
|
||||
ITEM.RADIO("MathJax", "context"),
|
||||
ITEM.RADIO(["MathJax","MathJax"], "context"),
|
||||
ITEM.RADIO(["Browser","Browser"], "context")
|
||||
),
|
||||
ITEM.COMMAND(["Scale","Scale All Math ..."],MENU.Scale),
|
||||
|
|
Loading…
Reference in New Issue
Block a user