|
45 | 45 | AutoStat : true, |
46 | 46 | OptStat : 1111, |
47 | 47 | OptFit : 0, |
48 | | - StatNDC : { fX1NDC : 0.78, fY1NDC: 0.75, fX2NDC: 0.98, fY2NDC: 0.91 }, |
| 48 | + FrameNDC : { fX1NDC: 0.07, fY1NDC: 0.12, fX2NDC: 0.95, fY2NDC: 0.88 }, |
| 49 | + StatNDC : { fX1NDC: 0.78, fY1NDC: 0.75, fX2NDC: 0.98, fY2NDC: 0.91 }, |
49 | 50 | StatText : { fTextAngle: 0, fTextSize: 9, fTextAlign: 12, fTextColor: 1, fTextFont: 42 }, |
50 | 51 | StatFill : { fFillColor: 0, fFillStyle: 1001 }, |
51 | 52 | TimeOffset : 788918400000, // UTC time at 01/01/95 |
|
1820 | 1821 | JSROOT.TFramePainter.prototype.Shrink = function(shrink_left, shrink_right) { |
1821 | 1822 | var ndc = this.svg_frame().property('NDC'); |
1822 | 1823 | if (ndc) { |
1823 | | - ndc.x1 += shrink_left; |
1824 | | - ndc.x2 -= shrink_right; |
| 1824 | + ndc.fX1NDC += shrink_left; |
| 1825 | + ndc.fX2NDC -= shrink_right; |
1825 | 1826 | } |
1826 | 1827 | } |
1827 | 1828 |
|
|
1830 | 1831 | var w = width, h = height; |
1831 | 1832 |
|
1832 | 1833 | var ndc = this.svg_frame().empty() ? null : this.svg_frame().property('NDC'); |
1833 | | - if (ndc == null) ndc = { x1 : 0.07, y1 : 0.12, x2 : 0.95, y2 : 0.88 }; |
| 1834 | + if (ndc == null) ndc = JSROOT.clone(JSROOT.gStyle.FrameNDC); |
1834 | 1835 |
|
1835 | 1836 | var root_pad = this.root_pad(); |
1836 | 1837 |
|
1837 | | - var lm = width * ndc.x1; |
1838 | | - var rm = width * (1 - ndc.x2); |
1839 | | - var tm = height * ndc.y1; |
1840 | | - var bm = height * (1 - ndc.y2); |
| 1838 | + var lm = width * ndc.fX1NDC; |
| 1839 | + var rm = width * (1 - ndc.fX2NDC); |
| 1840 | + var tm = height * ndc.fY1NDC; |
| 1841 | + var bm = height * (1 - ndc.fY2NDC); |
1841 | 1842 |
|
1842 | 1843 | var framecolor = this.createAttFill('white'), |
1843 | 1844 | lineatt = JSROOT.Painter.createAttLine('black'), |
|
1906 | 1907 |
|
1907 | 1908 | // calculate actual NDC coordinates, use them to properly locate PALETTE |
1908 | 1909 | frame_g.property('NDC', { |
1909 | | - x1 : lm / width, |
1910 | | - x2 : (lm + w) / width, |
1911 | | - y1 : tm / height, |
1912 | | - y2 : (tm + h) / height |
| 1910 | + fX1NDC : lm / width, |
| 1911 | + fX2NDC : (lm + w) / width, |
| 1912 | + fY1NDC : tm / height, |
| 1913 | + fY2NDC : (tm + h) / height |
1913 | 1914 | }); |
1914 | 1915 |
|
1915 | 1916 | // simple workaround to access painter via frame container |
|
6142 | 6143 |
|
6143 | 6144 | var ndc = this.svg_frame().property('NDC'); |
6144 | 6145 |
|
6145 | | - pal['fX1NDC'] = ndc.x2 - rel_width; |
6146 | | - pal['fY1NDC'] = ndc.y1; |
6147 | | - pal['fX2NDC'] = ndc.x2; |
6148 | | - pal['fY2NDC'] = ndc.y2; |
| 6146 | + pal['fX1NDC'] = ndc.fX2NDC - rel_width; |
| 6147 | + pal['fY1NDC'] = ndc.fY1NDC; |
| 6148 | + pal['fX2NDC'] = ndc.fX2NDC; |
| 6149 | + pal['fY2NDC'] = ndc.fY2NDC; |
6149 | 6150 | pal['fInit'] = 1; |
6150 | 6151 | pal['fShadowColor'] = 1; |
6151 | 6152 | pal['fCorenerRadius'] = 0; |
|
0 commit comments