Skip to content

Commit d234b2b

Browse files
committed
Make create_stats private
Remove from graph painter
1 parent 44205bd commit d234b2b

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

modules/hist2d/TGraphPainter.mjs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1739,8 +1739,6 @@ class TGraphPainter extends ObjectPainter {
17391739
if (!st.fOptFit || this.getCanvPainter()?.getRootPad(true)?.fPrimitives?.arr.length)
17401740
return null;
17411741

1742-
this.create_stats = true;
1743-
17441742
stats = create(clTPaveStats);
17451743
Object.assign(stats, {
17461744
fName: 'stats', fOptStat: 0, fOptFit: st.fOptFit, fBorderSize: 1,

modules/hist2d/THistPainter.mjs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1139,6 +1139,7 @@ class THistPainter extends ObjectPainter {
11391139
#auto_exec; // can be reused when sending option back to server
11401140
#funcs_handler; // special instance for functions drawing
11411141
#contour; // histogram colors contour
1142+
#create_stats; // if stats was created by painter
11421143

11431144
/** @summary Constructor
11441145
* @param {object|string} dom - DOM element for drawing or element id
@@ -1442,7 +1443,7 @@ class THistPainter extends ObjectPainter {
14421443
histo.fBins = obj.fBins;
14431444

14441445
// remove old functions, update existing, prepare to draw new one
1445-
this.#funcs_handler = new FunctionsHandler(this, pp, obj.fFunctions, statpainter, this.create_stats);
1446+
this.#funcs_handler = new FunctionsHandler(this, pp, obj.fFunctions, statpainter, this.#create_stats);
14461447

14471448
const changed_opt = (histo.fOption !== obj.fOption);
14481449
histo.fOption = obj.fOption;
@@ -1767,7 +1768,7 @@ class THistPainter extends ObjectPainter {
17671768

17681769
/** @summary Returns true if stats box fill can be ignored */
17691770
isIgnoreStatsFill() {
1770-
return !this.getObject() || (!this.draw_content && !this.create_stats && !this.hasSnapId());
1771+
return !this.getObject() || (!this.draw_content && !this.#create_stats && !this.hasSnapId());
17711772
}
17721773

17731774
/** @summary Create stat box for histogram if required */
@@ -1806,7 +1807,7 @@ class THistPainter extends ObjectPainter {
18061807
if (!stats && !optstat && !optfit)
18071808
return null;
18081809

1809-
this.create_stats = true;
1810+
this.#create_stats = true;
18101811

18111812
if (stats)
18121813
return stats;

0 commit comments

Comments
 (0)