Skip to content

Commit 678e282

Browse files
committed
Build with stats fix
1 parent d234b2b commit 678e282

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

build/jsroot.js

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const version_id = 'dev',
1414

1515
/** @summary version date
1616
* @desc Release date in format day/month/year like '14/04/2022' */
17-
version_date = '7/11/2025',
17+
version_date = '12/11/2025',
1818

1919
/** @summary version id and date
2020
* @desc Produced by concatenation of {@link version_id} and {@link version_date}
@@ -94010,7 +94010,7 @@ class FunctionsHandler {
9401094010
#painter; // object painter to which functions belongs
9401194011
#pad_painter; // pad painter
9401294012

94013-
constructor(painter, pp, funcs, statpainter) {
94013+
constructor(painter, pp, funcs, statpainter, update_statpainter) {
9401494014
this.#painter = painter;
9401594015
this.#pad_painter = pp;
9401694016

@@ -94069,6 +94069,8 @@ class FunctionsHandler {
9406994069
const indx = painters.indexOf(statpainter);
9407094070
if (indx >= 0)
9407194071
painters.splice(indx, 1);
94072+
if (update_statpainter && (update_painters.indexOf(statpainter) < 0))
94073+
update_painters.push(statpainter);
9407294074
}
9407394075

9407494076
// remove all function which are not found in new list of functions
@@ -94139,6 +94141,7 @@ class THistPainter extends ObjectPainter {
9413994141
#auto_exec; // can be reused when sending option back to server
9414094142
#funcs_handler; // special instance for functions drawing
9414194143
#contour; // histogram colors contour
94144+
#create_stats; // if stats was created by painter
9414294145

9414394146
/** @summary Constructor
9414494147
* @param {object|string} dom - DOM element for drawing or element id
@@ -94442,7 +94445,7 @@ class THistPainter extends ObjectPainter {
9444294445
histo.fBins = obj.fBins;
9444394446

9444494447
// remove old functions, update existing, prepare to draw new one
94445-
this.#funcs_handler = new FunctionsHandler(this, pp, obj.fFunctions, statpainter);
94448+
this.#funcs_handler = new FunctionsHandler(this, pp, obj.fFunctions, statpainter, this.#create_stats);
9444694449

9444794450
const changed_opt = (histo.fOption !== obj.fOption);
9444894451
histo.fOption = obj.fOption;
@@ -94767,7 +94770,7 @@ class THistPainter extends ObjectPainter {
9476794770

9476894771
/** @summary Returns true if stats box fill can be ignored */
9476994772
isIgnoreStatsFill() {
94770-
return !this.getObject() || (!this.draw_content && !this.create_stats && !this.hasSnapId());
94773+
return !this.getObject() || (!this.draw_content && !this.#create_stats && !this.hasSnapId());
9477194774
}
9477294775

9477394776
/** @summary Create stat box for histogram if required */
@@ -94806,7 +94809,7 @@ class THistPainter extends ObjectPainter {
9480694809
if (!stats && !optstat && !optfit)
9480794810
return null;
9480894811

94809-
this.create_stats = true;
94812+
this.#create_stats = true;
9481094813

9481194814
if (stats)
9481294815
return stats;
@@ -106693,8 +106696,6 @@ let TGraphPainter$1 = class TGraphPainter extends ObjectPainter {
106693106696
if (!st.fOptFit || this.getCanvPainter()?.getRootPad(true)?.fPrimitives?.arr.length)
106694106697
return null;
106695106698

106696-
this.create_stats = true;
106697-
106698106699
stats = create$1(clTPaveStats);
106699106700
Object.assign(stats, {
106700106701
fName: 'stats', fOptStat: 0, fOptFit: st.fOptFit, fBorderSize: 1,

modules/core.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const version_id = 'dev',
66

77
/** @summary version date
88
* @desc Release date in format day/month/year like '14/04/2022' */
9-
version_date = '7/11/2025',
9+
version_date = '12/11/2025',
1010

1111
/** @summary version id and date
1212
* @desc Produced by concatenation of {@link version_id} and {@link version_date}

0 commit comments

Comments
 (0)