|
46 | 46 | StatFill : { fFillColor: 0, fFillStyle: 1001 },
|
47 | 47 | TimeOffset : 788918400000, // UTC time at 01/01/95
|
48 | 48 | StatFormat : function(v) { return (Math.abs(v) < 1e5) ? v.toFixed(5) : v.toExponential(7); },
|
49 |
| - StatEntriesFormat : function(v) { return (Math.abs(v) < 1e7) ? v.toFixed(0) : v.toExponential(7); } |
| 49 | + StatEntriesFormat : function(v) { return (Math.abs(v) < 1e7) ? v.toFixed(0) : v.toExponential(7); }, |
| 50 | + MathJax : 0, // 0 - never, 1 - only for complex cases, 2 - always |
50 | 51 | };
|
51 | 52 |
|
52 | 53 | /**
|
|
78 | 79 | col = parseInt(col);
|
79 | 80 | if ((col!=NaN) && (col>0) && (col<4)) JSROOT.gStyle.DefaultCol = col;
|
80 | 81 | }
|
| 82 | + |
| 83 | + var mathjax = JSROOT.GetUrlOption("mathjax", url); |
| 84 | + if (mathjax == "") JSROOT.gStyle.MathJax = 1; else |
| 85 | + if (mathjax != null) { |
| 86 | + JSROOT.gStyle.MathJax = parseInt(mathjax); |
| 87 | + if (JSROOT.gStyle.MathJax == NaN) JSROOT.gStyle.MathJax = 1; |
| 88 | + } |
81 | 89 | }
|
82 | 90 |
|
83 | 91 | JSROOT.createMenu = function(menuname) {
|
|
6313 | 6321 | var pos_x = tpos_x;
|
6314 | 6322 | if ((lopt.indexOf('h')>=0) || (lopt.length==0)) pos_x = padding_x;
|
6315 | 6323 |
|
6316 |
| - if ((label.indexOf("#frac")<0) || JSROOT.browser.isIE) { |
| 6324 | + if ((JSROOT.gStyle.MathJax < 1) || (label.indexOf("#frac")<0)) { |
6317 | 6325 | p.append("text")
|
6318 | 6326 | .attr("class", "text")
|
6319 | 6327 | .attr("text-anchor", "start")
|
|
6355 | 6363 | var rect = body.node().getBoundingClientRect();
|
6356 | 6364 | var fact_x = parseInt(rect.right - rect.left) / fo_w;
|
6357 | 6365 | var fact_y = parseInt(rect.bottom - rect.top) / fo_h;
|
6358 |
| - if (Math.max(fact_x, fact_y) > 1) |
| 6366 | + if (Math.max(fact_x, fact_y) > 1) |
6359 | 6367 | body.style("font", font.asStyle(Math.round(font.size/Math.max(fact_x, fact_y))));
|
6360 | 6368 | });
|
6361 | 6369 | });
|
|
0 commit comments