Make IE9 and IE10 use SVG for menclose rather than SVG (when in a document mode that supports it). Resolves issue #324.

This commit is contained in:
Davide P. Cervone 2012-09-29 15:54:22 -04:00
parent e7b29726b6
commit 5921c8cb84
2 changed files with 14 additions and 9 deletions

File diff suppressed because one or more lines are too long

View File

@ -279,10 +279,14 @@ MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () {
MathJax.Hub.Browser.Select({ MathJax.Hub.Browser.Select({
MSIE: function (browser) { MSIE: function (browser) {
//
// IE8 and below doesn't have SVG, so use VML
//
if ((document.documentMode||0) < 9) {
MML.menclose.Augment({HTMLpx: function (n,d) {return (n*HTMLCSS.em+(d||0))+"px"}}); MML.menclose.Augment({HTMLpx: function (n,d) {return (n*HTMLCSS.em+(d||0))+"px"}});
HTMLCSS.useVML = true; HTMLCSS.useVML = true;
if (!document.namespaces[vmlns]) { if (!document.namespaces[vmlns]) {
if (document.documentMode && document.documentMode >= 8) { if (document.documentMode && document.documentMode === 8) {
document.namespaces.add(vmlns,VMLNS,"#default#VML"); document.namespaces.add(vmlns,VMLNS,"#default#VML");
} else { } else {
document.namespaces.add(vmlns,VMLNS); document.namespaces.add(vmlns,VMLNS);
@ -290,6 +294,7 @@ MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () {
} }
} }
} }
}
}); });