From f739e64131278a3ff54222ce69419646211799a3 Mon Sep 17 00:00:00 2001
From: Peter Krautzberger
Date: Tue, 17 Mar 2015 10:54:24 +0100
Subject: [PATCH 1/6] WIP for #1088: switch from PNG to \×
---
unpacked/extensions/HelpDialog.js | 13 +++++++------
unpacked/extensions/MathMenu.js | 26 +++++++++++++++-----------
2 files changed, 22 insertions(+), 17 deletions(-)
diff --git a/unpacked/extensions/HelpDialog.js b/unpacked/extensions/HelpDialog.js
index 322086b3f..e801d4475 100644
--- a/unpacked/extensions/HelpDialog.js
+++ b/unpacked/extensions/HelpDialog.js
@@ -34,7 +34,7 @@
var MENU = MathJax.Menu;
var CONFIG = HUB.CombineConfig("HelpDialog",{
- closeImg: AJAX.urlRev(OUTPUT.imageDir+"/CloseX-31.png"), // image for close "X" for mobiles
+// closeImg: AJAX.urlRev(OUTPUT.imageDir+"/CloseX-31.png"), // image for close "X" for mobiles
styles: {
"#MathJax_Help": {
@@ -122,11 +122,12 @@
]
]],
["a",{href:"http://www.mathjax.org/"},["www.mathjax.org"]],
- ["img", {
- src: CONFIG.closeImg,
- style: {width:"21px", height:"21px", position:"absolute", top:".2em", right:".2em"},
- onclick: HELP.Remove
- }]
+// ["img", {
+// src: CONFIG.closeImg,
+// style: {width:"21px", height:"21px", position:"absolute", top:".2em", right:".2em"},
+// onclick: HELP.Remove
+// }]
+ ["span",{style:{width:"21px", height:"21px", "font-weight": "bold", "font-size": "1.33em", position:"absolute", top:".2em", right:".2em"}, onclick: HELP.Remove},["\u00D7"]]
]));
LOCALE.setCSS(help);
var doc = (document.documentElement||{});
diff --git a/unpacked/extensions/MathMenu.js b/unpacked/extensions/MathMenu.js
index dcbbab3f7..16b4d68d7 100644
--- a/unpacked/extensions/MathMenu.js
+++ b/unpacked/extensions/MathMenu.js
@@ -48,7 +48,7 @@
var CONFIG = HUB.CombineConfig("MathMenu",{
delay: 150, // the delay for submenus
- closeImg: AJAX.urlRev(OUTPUT.imageDir+"/CloseX-31.png"), // image for close "X" for mobiles
+// closeImg: AJAX.urlRev(OUTPUT.imageDir+"/CloseX-31.png"), // image for close "X" for mobiles
showRenderer: true, // show the "Math Renderer" menu?
showMathPlayer: true, // show the "MathPlayer" menu?
@@ -212,7 +212,10 @@
HTML.addElement(menu,"span",{
className: "MathJax_Menu_Close", menu: parent,
ontouchstart: MENU.Close, ontouchend: FALSE, onmousedown: MENU.Close, onmouseup: FALSE
- },[["img",{src: CONFIG.closeImg, style:{width:"100%",height:"100%"}}]]);
+ },[
+// ["img",{src: CONFIG.closeImg, style:{width:"100%",height:"100%"}}]
+ ["span",{style:{width:"21px", height:"21px", "font-weight": "bold", "font-size": "1.33em", position:"absolute", top:".2em", right:".2em"}, onclick: MENU.About.Remove},"\u00D7"]
+ ]);
}
div.appendChild(menu);
@@ -376,9 +379,9 @@
//
// Preload images so they show up with the menu
//
- getImages: function () {
- if (MENU.isMobile) {var close = new Image(); close.src = CONFIG.closeImg}
- }
+// getImages: function () {
+// if (MENU.isMobile) {var close = new Image(); close.src = CONFIG.closeImg}
+// }
});
@@ -665,11 +668,12 @@
"background-color":"#E4E4E4", padding:".4em .6em", border:"1px inset"
}},jax],["br"],["br"],
["a",{href:"http://www.mathjax.org/"},["www.mathjax.org"]],
- ["img", {
- src: CONFIG.closeImg,
- style: {width:"21px", height:"21px", position:"absolute", top:".2em", right:".2em"},
- onclick: MENU.About.Remove
- }]
+// ["img", {
+// src: CONFIG.closeImg,
+// style: {width:"21px", height:"21px", position:"absolute", top:".2em", right:".2em"},
+// onclick: MENU.About.Remove
+// }]
+ ["span",{style:{width:"21px", height:"21px", "font-weight": "bold", "font-size": "1.33em", position:"absolute", top:".2em", right:".2em"}, onclick: MENU.About.Remove},"\u00D7"]
]);
MathJax.Localization.setCSS(about);
var doc = (document.documentElement||{});
@@ -1191,7 +1195,7 @@
CALLBACK.Queue(
HUB.Register.StartupHook("End Config",{}), // wait until config is complete
- ["getImages",MENU],
+// ["getImages",MENU],
["Styles",AJAX,CONFIG.styles],
["Post",HUB.Startup.signal,"MathMenu Ready"],
["loadComplete",AJAX,"[MathJax]/extensions/MathMenu.js"]
From df17921e8bd5ec3fd1107562ffa7335776e6a1b0 Mon Sep 17 00:00:00 2001
From: Peter Krautzberger
Date: Tue, 17 Mar 2015 11:32:38 +0100
Subject: [PATCH 2/6] WIP #1088: change submenu indicators to a more common
Unicode point
---
unpacked/extensions/MathMenu.js | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/unpacked/extensions/MathMenu.js b/unpacked/extensions/MathMenu.js
index 16b4d68d7..0d38b0a40 100644
--- a/unpacked/extensions/MathMenu.js
+++ b/unpacked/extensions/MathMenu.js
@@ -121,8 +121,8 @@
},
".MathJax_MenuArrow": {
- position:"absolute", right:".5em", color:"#666666",
- "font-family": (isMSIE ? "'Arial unicode MS'" : null)
+ position:"absolute", right:".5em", "padding-top":".25em", color:"#666666",
+ "font-family": (isMSIE ? "'Arial unicode MS'" : null), "font-size": ".75em"
},
".MathJax_MenuActive .MathJax_MenuArrow": {color:"white"},
".MathJax_MenuArrow.RTL": {left:".5em", right:"auto"},
@@ -374,7 +374,7 @@
},
saveCookie: function () {HTML.Cookie.Set("menu",this.cookie)},
- getCookie: function () {this.cookie = HTML.Cookie.Get("menu")},
+ getCookie: function () {this.cookie = HTML.Cookie.Get("menu")}
//
// Preload images so they show up with the menu
@@ -488,8 +488,8 @@
*/
MENU.ITEM.SUBMENU = MENU.ITEM.Subclass({
menu: null, // the submenu
- marker: (isPC && !HUB.Browser.isSafari ? "\u25B6" : "\u25B8"), // the menu arrow
- markerRTL: (isPC && !HUB.Browser.isSafari ? "\u25B0" : "\u25C2"),
+ marker: "\u25BA", // the submenu arrow
+ markerRTL: "\u25C4", // the submenu arrow for RTL
Init: function (name,def) {
if (!(name instanceof Array)) {name = [name,name]} // make [id,label] pair
From 2abf1649ee7c9e55fa4c9246e4c11c433c162504 Mon Sep 17 00:00:00 2001
From: Peter Krautzberger
Date: Thu, 19 Mar 2015 20:54:30 +0100
Subject: [PATCH 3/6] 1100: code clean up
---
images/CloseX-31.png | Bin 1267 -> 0 bytes
unpacked/extensions/HelpDialog.js | 23 +++++++++--------
unpacked/extensions/MathMenu.js | 41 ++++++++++++++----------------
3 files changed, 32 insertions(+), 32 deletions(-)
delete mode 100644 images/CloseX-31.png
diff --git a/images/CloseX-31.png b/images/CloseX-31.png
deleted file mode 100644
index 1672200e46d066d184317cdfb223b3678381955d..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 1267
zcmV=jYtp+tAO?%E`&Z!^60@x2&tHt*fi2rKO>tpOur7p`V|prKPN^
ztF5c6xVN{&!^6tS$=k4w7?(OaK^Yj1z|4~+OG5`Po4|GyaQve()
zDmgh-aet1g#>Uj+k!OQX000CwNkljWHLQbuq@2W%0JZ%F2l7GF7=NxR!+KeJ=1}gp~RCU2<`%
zB}4V;7ZY%nY@L4zO->Ed?~mRSUm`jOU;ZR#7g>>;B`dlVn>YSHst>~yX$anlu5G(N
zUQ}=xXCP<{P96T3nYy{V*jocq^dl=WgGTtn=?bbiRO)`*ET*dWd}n{cw|5&DWHr
zuSR0s4qNB8?Ub$760;NRZrY>{==tosZuSs@cmL!=7UZLxT#P9_D
z7_sfJ@{oxd7;Hp8Cg#4u$|JHQ6!Bs8w}RifgZ4lryU5X-zaksaJRa#+vd>#6ElOC2
zE!Fb}U_)aigpCOF1F>|6b;Sxx(WMuE0yZQzEqEzFKdDKVr#|tm<_J6DQ=Tf;mu_Ef
z9b~h@%l7Q*;!Am|=h-a1m#0dA*VyL-o1kOQ*O)dmoM$uiPbG6W_=vm87dklN=s0+%
zrbIjsbXLu72cyH_R(~IXx4_M}1{1A5`dO>hc2Tx1S*?HTSP}=Gp^ZG)D7yZxJhNW#w@KgU
zA>o8xd2a7B+$^IBNhfQ^O?sPa$C??wxFXg|yG92##8p3c`7g!74dGazuYQE1+r__^
z3f=9wgZWQ-j9e9E9X{ddi4WAV>V@TxUkj?$GmqsI_uI6#E$@V(hqYcqb-1(QC2t=7
zjKZ$NUeo0;P~{6eBrFG1APN9Y4=-?|xx&&}ww@?6!{M(aonqr`2!}%m-_>5z6%_cD
zfx|JV(PqQ1Z(1CAI?vV~lLB|b(|NWy5>C*Oy+0i3$lf3BCU|7K!;ua2-QdXP=seu#
zuz9*iI8ibT`wwMykODCX1X1)1LL=V)q*)i3ywut_wHfUCzkTca$n?+adRc7L;r(FA
z&h*(TJyB0~;<1woOL1JEMKM!K{Jgb=ckE+GUJ1_lN}LxoWS
zf`LKMmVnluU|tc%LC&fO+ZZMYoq5Uub=a`Nj2jE678|T}kppbN8VFgI)jt
diff --git a/unpacked/extensions/HelpDialog.js b/unpacked/extensions/HelpDialog.js
index e801d4475..adf7a0526 100644
--- a/unpacked/extensions/HelpDialog.js
+++ b/unpacked/extensions/HelpDialog.js
@@ -1,6 +1,3 @@
-/* -*- Mode: Javascript; indent-tabs-mode:nil; js-indent-level: 2 -*- */
-/* vim: set ts=2 et sw=2 tw=80: */
-
/*************************************************************
*
* MathJax/extensions/HelpDialog.js
@@ -34,7 +31,6 @@
var MENU = MathJax.Menu;
var CONFIG = HUB.CombineConfig("HelpDialog",{
-// closeImg: AJAX.urlRev(OUTPUT.imageDir+"/CloseX-31.png"), // image for close "X" for mobiles
styles: {
"#MathJax_Help": {
@@ -61,6 +57,14 @@
overflow:"auto", "text-align":"left", "font-size":"80%",
padding:".4em .6em", border:"1px inset", margin:"1em 0px",
"max-height":"20em", "max-width":"30em", "background-color":"#EEEEEE"
+ },
+
+ ".MathJax_Menu_Close": {
+ position:"absolute",
+ width:"21px", height:"21px",
+ top:".2em", right:".2em",
+ "font-weight": "bold",
+ "font-size": "1.33em"
}
}
});
@@ -122,12 +126,11 @@
]
]],
["a",{href:"http://www.mathjax.org/"},["www.mathjax.org"]],
-// ["img", {
-// src: CONFIG.closeImg,
-// style: {width:"21px", height:"21px", position:"absolute", top:".2em", right:".2em"},
-// onclick: HELP.Remove
-// }]
- ["span",{style:{width:"21px", height:"21px", "font-weight": "bold", "font-size": "1.33em", position:"absolute", top:".2em", right:".2em"}, onclick: HELP.Remove},["\u00D7"]]
+ ["span",{
+ className: "MathJax_Menu_Close",
+ onclick: HELP.Remove},
+ ["\u00D7"]
+ ]
]));
LOCALE.setCSS(help);
var doc = (document.documentElement||{});
diff --git a/unpacked/extensions/MathMenu.js b/unpacked/extensions/MathMenu.js
index 0d38b0a40..23a53db87 100644
--- a/unpacked/extensions/MathMenu.js
+++ b/unpacked/extensions/MathMenu.js
@@ -48,7 +48,6 @@
var CONFIG = HUB.CombineConfig("MathMenu",{
delay: 150, // the delay for submenus
-// closeImg: AJAX.urlRev(OUTPUT.imageDir+"/CloseX-31.png"), // image for close "X" for mobiles
showRenderer: true, // show the "Math Renderer" menu?
showMathPlayer: true, // show the "MathPlayer" menu?
@@ -161,8 +160,17 @@
".MathJax_Menu_Close": {
position:"absolute",
- width: "31px", height: "31px",
- top:"-15px", left:"-15px"
+ width:"21px", height:"21px",
+ top:".2em", right:".2em",
+ "font-weight": "bold",
+ "font-size": "1.33em"
+ },
+ ".MathJax_Menu_Mobile_Close": {
+ position:"absolute",
+ width:"1em", height:"1em",
+ top:"0", left:"0",
+ "font-weight": "bold",
+ "font-size": "1.33em"
}
}
});
@@ -210,12 +218,10 @@
for (var i = 0, m = this.items.length; i < m; i++) {this.items[i].Create(menu)}
if (MENU.isMobile) {
HTML.addElement(menu,"span",{
- className: "MathJax_Menu_Close", menu: parent,
+ className: "MathJax_Menu_Mobile_Close", menu: parent,
ontouchstart: MENU.Close, ontouchend: FALSE, onmousedown: MENU.Close, onmouseup: FALSE
- },[
-// ["img",{src: CONFIG.closeImg, style:{width:"100%",height:"100%"}}]
- ["span",{style:{width:"21px", height:"21px", "font-weight": "bold", "font-size": "1.33em", position:"absolute", top:".2em", right:".2em"}, onclick: MENU.About.Remove},"\u00D7"]
- ]);
+ },"\u00D7"
+ );
}
div.appendChild(menu);
@@ -375,13 +381,6 @@
saveCookie: function () {HTML.Cookie.Set("menu",this.cookie)},
getCookie: function () {this.cookie = HTML.Cookie.Get("menu")}
-
- //
- // Preload images so they show up with the menu
- //
-// getImages: function () {
-// if (MENU.isMobile) {var close = new Image(); close.src = CONFIG.closeImg}
-// }
});
@@ -668,12 +667,11 @@
"background-color":"#E4E4E4", padding:".4em .6em", border:"1px inset"
}},jax],["br"],["br"],
["a",{href:"http://www.mathjax.org/"},["www.mathjax.org"]],
-// ["img", {
-// src: CONFIG.closeImg,
-// style: {width:"21px", height:"21px", position:"absolute", top:".2em", right:".2em"},
-// onclick: MENU.About.Remove
-// }]
- ["span",{style:{width:"21px", height:"21px", "font-weight": "bold", "font-size": "1.33em", position:"absolute", top:".2em", right:".2em"}, onclick: MENU.About.Remove},"\u00D7"]
+ ["span",{
+ className: "MathJax_Menu_Close",
+ onclick: MENU.About.Remove},
+ "\u00D7"
+ ]
]);
MathJax.Localization.setCSS(about);
var doc = (document.documentElement||{});
@@ -1195,7 +1193,6 @@
CALLBACK.Queue(
HUB.Register.StartupHook("End Config",{}), // wait until config is complete
-// ["getImages",MENU],
["Styles",AJAX,CONFIG.styles],
["Post",HUB.Startup.signal,"MathMenu Ready"],
["loadComplete",AJAX,"[MathJax]/extensions/MathMenu.js"]
From bbd05107a77eaa9d84e5e20ead4ff5047b64d3fc Mon Sep 17 00:00:00 2001
From: Peter Krautzberger
Date: Thu, 19 Mar 2015 21:10:16 +0100
Subject: [PATCH 4/6] #1100 add cursor:pointer to MathJax_Menu_Close class
---
unpacked/extensions/HelpDialog.js | 1 +
unpacked/extensions/MathMenu.js | 1 +
2 files changed, 2 insertions(+)
diff --git a/unpacked/extensions/HelpDialog.js b/unpacked/extensions/HelpDialog.js
index adf7a0526..9d9e80a02 100644
--- a/unpacked/extensions/HelpDialog.js
+++ b/unpacked/extensions/HelpDialog.js
@@ -63,6 +63,7 @@
position:"absolute",
width:"21px", height:"21px",
top:".2em", right:".2em",
+ cursor:"pointer",
"font-weight": "bold",
"font-size": "1.33em"
}
diff --git a/unpacked/extensions/MathMenu.js b/unpacked/extensions/MathMenu.js
index 23a53db87..9f866a6df 100644
--- a/unpacked/extensions/MathMenu.js
+++ b/unpacked/extensions/MathMenu.js
@@ -162,6 +162,7 @@
position:"absolute",
width:"21px", height:"21px",
top:".2em", right:".2em",
+ cursor:"pointer",
"font-weight": "bold",
"font-size": "1.33em"
},
From 8484e903458addfe34261b102e0b354faeb0dc98 Mon Sep 17 00:00:00 2001
From: Peter Krautzberger
Date: Thu, 19 Mar 2015 22:20:30 +0100
Subject: [PATCH 5/6] #1100/#1088: convert MenuArrow-15.png to base64 and drop
it
---
images/MenuArrow-15.png | Bin 469 -> 0 bytes
unpacked/extensions/MathEvents.js | 2 +-
2 files changed, 1 insertion(+), 1 deletion(-)
delete mode 100644 images/MenuArrow-15.png
diff --git a/images/MenuArrow-15.png b/images/MenuArrow-15.png
deleted file mode 100644
index 2a3d03e5ee2f80a80b84da55e1144656067ecae7..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 469
zcmV;`0V@89P)0021%0{{R3NqQy{0000{P)t-s|NsBx
z+ACJ@~Nk%#KOYS(9oix
zp}DuW<>chk($c-Wyx7;*o}8TR?d|sV_WiVWW&i*H1$0tQQvg6;udh*QDP8~o0WL{I
zK~#8N?bvIM!ypU>S{eK@${k&Q(X~bFAEN4zS6=
zxe8XPTy196ZUHV`C{K4;ki~igT^`YDgEsAId9~$V7R_T)Y32>0cZ*OOGPOR|NSn#A
zq%UgV-PRbSOuMbKXx;7B*g>%N59T?;LMyB=$6~)h^_gA0Z&;LRq5qd^kZX~&@v2?!|x%OXvj^S
Date: Thu, 9 Apr 2015 14:58:24 -0400
Subject: [PATCH 6/6] Make text-based close boxes appear closer to the original
versions, and remove data URI for image in MathEvents. One motivatino for
the change is the mobile menu close icon needs a background, which was
missing in the previous version.
---
unpacked/extensions/HelpDialog.js | 41 +++++++++++++++------
unpacked/extensions/MathEvents.js | 60 +++++++++++++++++++++----------
unpacked/extensions/MathMenu.js | 60 ++++++++++++++++++++-----------
3 files changed, 111 insertions(+), 50 deletions(-)
diff --git a/unpacked/extensions/HelpDialog.js b/unpacked/extensions/HelpDialog.js
index 9d9e80a02..09365fd26 100644
--- a/unpacked/extensions/HelpDialog.js
+++ b/unpacked/extensions/HelpDialog.js
@@ -59,13 +59,34 @@
"max-height":"20em", "max-width":"30em", "background-color":"#EEEEEE"
},
- ".MathJax_Menu_Close": {
- position:"absolute",
- width:"21px", height:"21px",
- top:".2em", right:".2em",
- cursor:"pointer",
- "font-weight": "bold",
- "font-size": "1.33em"
+ "#MathJax_HelpClose": {
+ position:"absolute", top:".2em", right:".2em",
+ cursor:"pointer",
+ display:"inline-block",
+ border:"2px solid #AAA",
+ "border-radius":"18px",
+ "-webkit-border-radius": "18px", // Safari and Chrome
+ "-moz-border-radius": "18px", // Firefox
+ "-khtml-border-radius": "18px", // Konqueror
+ "font-family":"'Courier New',Courier",
+ "font-size":"24px",
+ color:"#F0F0F0"
+ },
+ "#MathJax_HelpClose span": {
+ display:"block", "background-color":"#AAA", border:"1.5px solid",
+ "border-radius":"18px",
+ "-webkit-border-radius": "18px", // Safari and Chrome
+ "-moz-border-radius": "18px", // Firefox
+ "-khtml-border-radius": "18px", // Konqueror
+ "line-height":0,
+ padding:"8px 0 6px" // may need to be browser-specific
+ },
+ "#MathJax_HelpClose:hover": {
+ color:"white!important",
+ border:"2px solid #CCC!important"
+ },
+ "#MathJax_HelpClose:hover span": {
+ "background-color":"#CCC!important"
}
}
});
@@ -127,10 +148,8 @@
]
]],
["a",{href:"http://www.mathjax.org/"},["www.mathjax.org"]],
- ["span",{
- className: "MathJax_Menu_Close",
- onclick: HELP.Remove},
- ["\u00D7"]
+ ["span",{id: "MathJax_HelpClose", onclick: HELP.Remove},
+ [["span",{},["\u00D7"]]]
]
]));
LOCALE.setCSS(help);
diff --git a/unpacked/extensions/MathEvents.js b/unpacked/extensions/MathEvents.js
index 2a8ff98ab..49853e69b 100644
--- a/unpacked/extensions/MathEvents.js
+++ b/unpacked/extensions/MathEvents.js
@@ -43,9 +43,8 @@
hcolor: "#83A" // haze color
},
button: {
- x: -4, y: -3, // menu button offsets
- wx: -2, // button offset for full-width equations
- src: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEsAAAA5CAMAAABJeiYSAAAAUVBMVEX////l5OTY19e2tbW3tbWVk5Owrq6cmpr5+Pj////X19fKycne3d3r6+vy8vKpp6fEwsLR0NCioaG5t7fl5OTT0tK9vLzY19eenJzt7e329vb9tHZmAAAABXRSTlMAQF+vr1FpKV4AAAEuSURBVHhe7dhrjsMgDARg0nRsyLvv7t7/oLtK1FCh3Thg/+wc4JNBExRwzlVH6HOs3G8OsMnBuQpWqVxtZtVuAS5dKE93WZDFegRdHtFqgzbtanm15V8WzWNSaeYNoneLUBoytT7WSJvJsaQvauDd1hikTLuts2jd7dbYQbD2D+Y5w0IrrDDHYr9B9ZldvW9YlGmh/5dqkGuRtPGyJfeixU5L7sWADEvoBRVZz7+oLxRZOAljCZZU2CsyLKGw52IL14Q6odwa05oqLDTJaaqx+DvZeIUFipR/KqykZBOUVizZALWFKTZeZ8VTsYOFRbHxagtNHEtt8RA8GVkAcQJ8/gunYmt6tzjow4sFNGqqwcviXkn1vFrgm1dI/jZTWO+1VB4sqS3v25bvAJbvEz/hAGybD4dbVwAAAABJRU5ErkJggg==" // button image
+ x: -6, y: -3, // menu button offsets
+ wx: -2 // button offset for full-width equations
},
fadeinInc: .2, // increment for fade-in
fadeoutInc: .05, // increment for fade-out
@@ -69,10 +68,33 @@
display: "inline-block", position:"absolute"
},
- ".MathJax_Hover_Arrow": {
+ ".MathJax_Menu_Button .MathJax_Hover_Arrow": {
position:"absolute",
- width:"15px", height:"11px",
- cursor:"pointer"
+ cursor:"pointer",
+ display:"inline-block",
+ border:"2px solid #AAA",
+ "border-radius":"4px",
+ "-webkit-border-radius": "4px", // Safari and Chrome
+ "-moz-border-radius": "4px", // Firefox
+ "-khtml-border-radius": "4px", // Konqueror
+ "font-family":"'Courier New',Courier",
+ "font-size":"9px",
+ color:"#F0F0F0"
+ },
+ ".MathJax_Menu_Button .MathJax_Hover_Arrow span": {
+ display:"block",
+ "background-color":"#AAA",
+ border:"1px solid",
+ "border-radius":"3px",
+ "line-height":0,
+ padding:"4px"
+ },
+ ".MathJax_Hover_Arrow:hover": {
+ color:"white!important",
+ border:"2px solid #CCC!important"
+ },
+ ".MathJax_Hover_Arrow:hover span": {
+ "background-color":"#CCC!important"
}
}
};
@@ -334,17 +356,17 @@
]]
);
var button = HTML.Element("span",{
- isMathJax: true, id:jax.hover.id+"Menu",
+ isMathJax: true, id:jax.hover.id+"Menu", className:"MathJax_Menu_Button",
style:{display:"inline-block", "z-index": 1, width:0, height:0, position:"relative"}
- },[["img",{
+ },[["span",{
className: "MathJax_Hover_Arrow", isMathJax: true, math: math,
- src: CONFIG.button.src, onclick: this.HoverMenu, jax:JAX.id,
+ onclick: this.HoverMenu, jax:JAX.id,
style: {
left:this.Px(bbox.w+dx+dd+(bbox.x||0)+CONFIG.button.x),
top:this.Px(-bbox.h-dy-dd-(bbox.y||0)-CONFIG.button.y),
opacity:0, filter:"alpha(opacity=0)"
}
- }]]
+ },[["span",{isMathJax:true},"\u25BC"]]]]
);
if (bbox.width) {
frame.style.width = button.style.width = bbox.width;
@@ -502,14 +524,16 @@
};
- //
- // Mobile screens are small, so use larger version of arrow
- //
- if (HUB.Browser.isMobile) {
- var arrow = CONFIG.styles[".MathJax_Hover_Arrow"];
- arrow.width = "25px"; arrow.height = "18px";
- CONFIG.button.x = -6;
- }
+ /*
+ * //
+ * // Mobile screens are small, so use larger version of arrow
+ * //
+ * if (HUB.Browser.isMobile) {
+ * var arrow = CONFIG.styles[".MathJax_Hover_Arrow"];
+ * arrow.width = "25px"; arrow.height = "18px";
+ * CONFIG.button.x = -6;
+ * }
+ */
//
// Set up browser-specific values
diff --git a/unpacked/extensions/MathMenu.js b/unpacked/extensions/MathMenu.js
index 9f866a6df..08b32b2c6 100644
--- a/unpacked/extensions/MathMenu.js
+++ b/unpacked/extensions/MathMenu.js
@@ -158,21 +158,43 @@
color: (isPC ? "HighlightText" : "white")
},
- ".MathJax_Menu_Close": {
- position:"absolute",
- width:"21px", height:"21px",
- top:".2em", right:".2em",
- cursor:"pointer",
- "font-weight": "bold",
- "font-size": "1.33em"
+ "#MathJax_AboutClose": {
+ top:".2em", right:".2em"
},
- ".MathJax_Menu_Mobile_Close": {
- position:"absolute",
- width:"1em", height:"1em",
- top:"0", left:"0",
- "font-weight": "bold",
- "font-size": "1.33em"
+ ".MathJax_Menu .MathJax_MenuClose": {
+ top:"-10px", left:"-10px"
+ },
+
+ ".MathJax_MenuClose": {
+ position:"absolute",
+ cursor:"pointer",
+ display:"inline-block",
+ border:"2px solid #AAA",
+ "border-radius":"18px",
+ "-webkit-border-radius": "18px", // Safari and Chrome
+ "-moz-border-radius": "18px", // Firefox
+ "-khtml-border-radius": "18px", // Konqueror
+ "font-family":"'Courier New',Courier",
+ "font-size":"24px",
+ color:"#F0F0F0"
+ },
+ ".MathJax_MenuClose span": {
+ display:"block", "background-color":"#AAA", border:"1.5px solid",
+ "border-radius":"18px",
+ "-webkit-border-radius": "18px", // Safari and Chrome
+ "-moz-border-radius": "18px", // Firefox
+ "-khtml-border-radius": "18px", // Konqueror
+ "line-height":0,
+ padding:"8px 0 6px" // may need to be browser-specific
+ },
+ ".MathJax_MenuClose:hover": {
+ color:"white!important",
+ border:"2px solid #CCC!important"
+ },
+ ".MathJax_MenuClose:hover span": {
+ "background-color":"#CCC!important"
}
+
}
});
@@ -219,10 +241,9 @@
for (var i = 0, m = this.items.length; i < m; i++) {this.items[i].Create(menu)}
if (MENU.isMobile) {
HTML.addElement(menu,"span",{
- className: "MathJax_Menu_Mobile_Close", menu: parent,
+ className: "MathJax_MenuClose", menu: parent,
ontouchstart: MENU.Close, ontouchend: FALSE, onmousedown: MENU.Close, onmouseup: FALSE
- },"\u00D7"
- );
+ },[["span",{},"\u00D7"]]);
}
div.appendChild(menu);
@@ -668,11 +689,8 @@
"background-color":"#E4E4E4", padding:".4em .6em", border:"1px inset"
}},jax],["br"],["br"],
["a",{href:"http://www.mathjax.org/"},["www.mathjax.org"]],
- ["span",{
- className: "MathJax_Menu_Close",
- onclick: MENU.About.Remove},
- "\u00D7"
- ]
+ ["span",{className:"MathJax_MenuClose",id:"MathJax_AboutClose",onclick:MENU.About.Remove},
+ [["span",{},"\u00D7"]]]
]);
MathJax.Localization.setCSS(about);
var doc = (document.documentElement||{});