Merge v2.0-candidate into SVG

This commit is contained in:
Davide P. Cervone 2011-12-07 14:07:47 -05:00
commit d044f4c8f4
17 changed files with 42 additions and 51 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -2295,8 +2295,8 @@ MathJax.Hub.Startup = {
},
Firefox: function (browser) {
if ((browser.version === "0.0" || navigator.userAgent.match(/Firefox/) == null) &&
navigator.product === "Gecko" && navigator.productSub) {
var date = navigator.productSub.substr(0,8);
navigator.product === "Gecko") {
var date = (navigator.buildID||navigator.productSub||"0").substr(0,8);
if (date >= "20110927") {browser.version = "7.0"}
else if (date >= "20110816") {browser.version = "6.0"}
else if (date >= "20110621") {browser.version = "5.0"}

View File

@ -212,7 +212,8 @@
if (SETTINGS.discoverable || SETTINGS.zoom === "Hover") {
var from = event.fromElement || event.relatedTarget,
to = event.toElement || event.target;
if (from && to && from.isMathJax != to.isMathJax) {
if (from && to && (from.isMathJax != to.isMathJax ||
HUB.getJaxFor(from) !== HUB.getJaxFor(to))) {
var jax = this.getJaxFromMath(math);
if (jax.hover) {HOVER.ReHover(jax)} else {HOVER.HoverTimer(jax,math)}
return EVENT.False(event);
@ -228,7 +229,8 @@
if (SETTINGS.discoverable || SETTINGS.zoom === "Hover") {
var from = event.fromElement || event.relatedTarget,
to = event.toElement || event.target;
if (from && to && from.isMathJax != to.isMathJax) {
if (from && to && (from.isMathJax != to.isMathJax ||
HUB.getJaxFor(from) !== HUB.getJaxFor(to))) {
var jax = this.getJaxFromMath(math);
if (jax.hover) {HOVER.UnHover(jax)} else {HOVER.ClearHoverTimer()}
return EVENT.False(event);
@ -497,7 +499,7 @@
HTML.Element("img",{style:{width:0,height:0,position:"relative"},src:"about:blank"}) :
HTML.Element("span",{style:{width:0,height:0,display:"inline-block"}})
);
if (1 || ME.operaPositionBug/* || ME.msieTopBug*/) {ME.topImg.style.border="1px solid"}
if (ME.operaPositionBug) {ME.topImg.style.border="1px solid"}
//
// Get configuration from user

View File

@ -184,7 +184,7 @@
if (MENU.isMobile) {
HTML.addElement(menu,"span",{
className: "MathJax_Menu_Close", menu: parent,
ontouchstart: MENU.Close, ontouchend: FALSE, onmousedown: MENU.Close
ontouchstart: MENU.Close, ontouchend: FALSE, onmousedown: MENU.Close, onmouseup: False,
},[["img",{src: CONFIG.closeImg, style:{width:"100%",height:"100%"}}]]);
}
this.posted = true;
@ -237,6 +237,7 @@
delete MENU.jax.hover.nofade;
HOVER.UnHover(MENU.jax);
}
return FALSE(event);
},
/*

View File

@ -88,7 +88,10 @@
},
checkItem: function (item) {
if (item.type === "over" && this.isOpen) {item.num = this.mmlData(FALSE); this.data = []}
if (item.type === "cell" && this.isOpen) {TEX.Error("Misplaced "+item.name)}
if (item.type === "cell" && this.isOpen) {
if (item.linebreak) {return FALSE}
TEX.Error("Misplaced "+item.name);
}
if (item.isClose && this[item.type+"Error"]) {TEX.Error(this[item.type+"Error"])}
if (!item.isNotStack) {return TRUE}
this.Push(item.data[0]); return FALSE;
@ -1493,7 +1496,7 @@
var n = this.GetBrackets(name).replace(/ /g,"");
if (n && !n.match(/^(((\.\d+|\d+(\.\d*)?))(pt|em|ex|mu|mm|cm|in|pc))$/))
{TEX.Error("Bracket argument to "+name+" must be a dimension")}
this.Push(STACKITEM.cell().With({isCR: TRUE, name: name}));
this.Push(STACKITEM.cell().With({isCR: TRUE, name: name, linebreak: TRUE}));
var top = this.stack.Top();
if (top.isa(STACKITEM.array)) {
if (n && top.arraydef.rowspacing) {
@ -1504,7 +1507,8 @@
top.arraydef.rowspacing = rows.join(' ');
}
} else {
// force line break
if (n) {this.Push(MML.mspace().With({depth:n}))}
this.Push(MML.mo().With({linebreak:MML.LINEBREAK.NEWLINE}));
}
},
emPerInch: 7.2,