Skip to content

Commit 5bd09b7

Browse files
committed
[jsroot] 7.3.x 23/11/2023
Fix - draw histogram with only negative bins jsroot:#276 Fix - reading TLeaf with fixed-size array Fix - correctly set pave name jsroot:#278
1 parent 2735cc8 commit 5bd09b7

File tree

9 files changed

+36
-24
lines changed

9 files changed

+36
-24
lines changed

js/build/jsroot.js

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ let version_id = '7.3.x';
1111

1212
/** @summary version date
1313
* @desc Release date in format day/month/year like '14/04/2022' */
14-
let version_date = '31/10/2023';
14+
let version_date = '23/11/2023';
1515

1616
/** @summary version id and date
1717
* @desc Produced by concatenation of {@link version_id} and {@link version_date}
@@ -1049,7 +1049,7 @@ function create$1(typename, target) {
10491049
create$1(clTBox, obj);
10501050
extend$1(obj, { fX1NDC : 0., fY1NDC: 0, fX2NDC: 1, fY2NDC: 1,
10511051
fBorderSize: 0, fInit: 1, fShadowColor: 1,
1052-
fCornerRadius: 0, fOption: 'brNDC', fName: 'title' });
1052+
fCornerRadius: 0, fOption: 'brNDC', fName: '' });
10531053
break;
10541054
case clTAttText:
10551055
extend$1(obj, { fTextAngle: 0, fTextSize: 0, fTextAlign: 22, fTextColor: 1, fTextFont: 42});
@@ -1069,7 +1069,7 @@ function create$1(typename, target) {
10691069
case clTLegend:
10701070
create$1(clTPave, obj);
10711071
create$1(clTAttText, obj);
1072-
extend$1(obj, { fColumnSeparation: 0, fEntrySeparation: 0.1, fMargin: 0.25, fNColumns: 1, fPrimitives: create$1(clTList),
1072+
extend$1(obj, { fColumnSeparation: 0, fEntrySeparation: 0.1, fMargin: 0.25, fNColumns: 1, fPrimitives: create$1(clTList), fName: clTPave,
10731073
fBorderSize: gStyle.fLegendBorderSize, fTextFont: gStyle.fLegendFont, fTextSize: gStyle.fLegendTextSize, fFillColor: gStyle.fLegendFillColor });
10741074
break;
10751075
case clTPaletteAxis:
@@ -61921,7 +61921,7 @@ class TH2Painter$2 extends THistPainter {
6192161921
// Paint histogram axis only
6192261922
this.draw_content = false;
6192361923
} else {
61924-
this.draw_content = (this.gmaxbin > 0);
61924+
this.draw_content = (this.gmaxbin !== 0) || (this.gminbin !== 0);
6192561925
if (!this.draw_content && this.options.Zero && this.isTH2Poly()) {
6192661926
this.draw_content = true;
6192761927
this.options.Line = 1;
@@ -64599,7 +64599,7 @@ class TH3Painter extends THistPainter {
6459964599
this.gmaxbin = bin_content;
6460064600
}
6460164601

64602-
this.draw_content = this.gmaxbin > 0;
64602+
this.draw_content = (this.gmaxbin !== 0) || (this.gminbin !== 0);
6460364603
}
6460464604

6460564605
/** @summary Count TH3 statistic */
@@ -80435,8 +80435,12 @@ async function treeProcess(tree, selector, args) {
8043580435
case 'TLeafC': datakind = kTString; break;
8043680436
default: return null;
8043780437
}
80438-
return createStreamerElement(name || leaf.fName, datakind);
80439-
80438+
const elem = createStreamerElement(name || leaf.fName, datakind);
80439+
if (leaf.fLen > 1) {
80440+
elem.fType += kOffsetL;
80441+
elem.fArrayLength = leaf.fLen;
80442+
}
80443+
return elem;
8044080444
}, findInHandle = branch => {
8044180445
for (let k = 0; k < handle.arr.length; ++k)
8044280446
if (handle.arr[k].branch === branch)
@@ -103720,11 +103724,10 @@ class RH2Painter$2 extends RHistPainter {
103720103724
// this value used for logz scale drawing
103721103725
if (this.gminposbin === null) this.gminposbin = this.gmaxbin*1e-4;
103722103726

103723-
if (this.options.Axis > 0) { // Paint histogram axis only
103727+
if (this.options.Axis > 0) // Paint histogram axis only
103724103728
this.draw_content = false;
103725-
} else {
103726-
this.draw_content = this.gmaxbin > 0;
103727-
}
103729+
else
103730+
this.draw_content = (this.gmaxbin !== 0) || (this.gminbin !== 0);
103728103731
}
103729103732

103730103733
/** @summary Count statistic */
@@ -104984,7 +104987,7 @@ class RH3Painter extends RHistPainter {
104984104987
}
104985104988
}
104986104989

104987-
this.draw_content = this.gmaxbin > 0;
104990+
this.draw_content = (this.gmaxbin !== 0) || (this.gminbin !== 0);
104988104991
}
104989104992

104990104993
/** @summary Count histogram statistic */

js/changes.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
16. Fix - add support of #mp symbol
2020
17. Fix - support TMath::Sq() function
2121
18. Fix - prevent drawing of empty TGraph
22+
19. Fix - draw histogram with only negative bins #276
23+
20. Fix - reading TLeaf with fixed-size array
24+
21. Fix - correctly set pave name #278
2225

2326

2427
## Changes in 7.3.4

js/modules/core.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ let version_id = '7.3.x';
55

66
/** @summary version date
77
* @desc Release date in format day/month/year like '14/04/2022' */
8-
let version_date = '31/10/2023';
8+
let version_date = '23/11/2023';
99

1010
/** @summary version id and date
1111
* @desc Produced by concatenation of {@link version_id} and {@link version_date}
@@ -1044,7 +1044,7 @@ function create(typename, target) {
10441044
create(clTBox, obj);
10451045
extend(obj, { fX1NDC : 0., fY1NDC: 0, fX2NDC: 1, fY2NDC: 1,
10461046
fBorderSize: 0, fInit: 1, fShadowColor: 1,
1047-
fCornerRadius: 0, fOption: 'brNDC', fName: 'title' });
1047+
fCornerRadius: 0, fOption: 'brNDC', fName: '' });
10481048
break;
10491049
case clTAttText:
10501050
extend(obj, { fTextAngle: 0, fTextSize: 0, fTextAlign: 22, fTextColor: 1, fTextFont: 42});
@@ -1064,7 +1064,7 @@ function create(typename, target) {
10641064
case clTLegend:
10651065
create(clTPave, obj);
10661066
create(clTAttText, obj);
1067-
extend(obj, { fColumnSeparation: 0, fEntrySeparation: 0.1, fMargin: 0.25, fNColumns: 1, fPrimitives: create(clTList),
1067+
extend(obj, { fColumnSeparation: 0, fEntrySeparation: 0.1, fMargin: 0.25, fNColumns: 1, fPrimitives: create(clTList), fName: clTPave,
10681068
fBorderSize: gStyle.fLegendBorderSize, fTextFont: gStyle.fLegendFont, fTextSize: gStyle.fLegendTextSize, fFillColor: gStyle.fLegendFillColor });
10691069
break;
10701070
case clTPaletteAxis:

js/modules/hist/RH3Painter.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class RH3Painter extends RHistPainter {
5050
}
5151
}
5252

53-
this.draw_content = this.gmaxbin > 0;
53+
this.draw_content = (this.gmaxbin !== 0) || (this.gminbin !== 0);
5454
}
5555

5656
/** @summary Count histogram statistic */

js/modules/hist/TH3Painter.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class TH3Painter extends THistPainter {
4141
this.gmaxbin = bin_content;
4242
}
4343

44-
this.draw_content = this.gmaxbin > 0;
44+
this.draw_content = (this.gmaxbin !== 0) || (this.gminbin !== 0);
4545
}
4646

4747
/** @summary Count TH3 statistic */

js/modules/hist2d/RH2Painter.mjs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -229,11 +229,10 @@ class RH2Painter extends RHistPainter {
229229
// this value used for logz scale drawing
230230
if (this.gminposbin === null) this.gminposbin = this.gmaxbin*1e-4;
231231

232-
if (this.options.Axis > 0) { // Paint histogram axis only
232+
if (this.options.Axis > 0) // Paint histogram axis only
233233
this.draw_content = false;
234-
} else {
235-
this.draw_content = this.gmaxbin > 0;
236-
}
234+
else
235+
this.draw_content = (this.gmaxbin !== 0) || (this.gminbin !== 0);
237236
}
238237

239238
/** @summary Count statistic */

js/modules/hist2d/TH2Painter.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ class TH2Painter extends THistPainter {
334334
// Paint histogram axis only
335335
this.draw_content = false;
336336
} else {
337-
this.draw_content = (this.gmaxbin > 0);
337+
this.draw_content = (this.gmaxbin !== 0) || (this.gminbin !== 0);
338338
if (!this.draw_content && this.options.Zero && this.isTH2Poly()) {
339339
this.draw_content = true;
340340
this.options.Line = 1;

js/modules/tree.mjs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1583,8 +1583,12 @@ async function treeProcess(tree, selector, args) {
15831583
case 'TLeafC': datakind = kTString; break;
15841584
default: return null;
15851585
}
1586-
return createStreamerElement(name || leaf.fName, datakind);
1587-
1586+
const elem = createStreamerElement(name || leaf.fName, datakind);
1587+
if (leaf.fLen > 1) {
1588+
elem.fType += kOffsetL;
1589+
elem.fArrayLength = leaf.fLen;
1590+
}
1591+
return elem;
15881592
}, findInHandle = branch => {
15891593
for (let k = 0; k < handle.arr.length; ++k)
15901594
if (handle.arr[k].branch === branch)

js/scripts/geoworker.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,9 @@ onmessage = function(e) {
9797

9898
// first mark all visible flags
9999
clones.setVisibleFlags(e.data.flags);
100+
clones.setVisLevel(e.data.vislevel);
101+
clones.setMaxVisNodes(e.data.maxvisnodes);
102+
100103
delete e.data.flags;
101104

102105
clones.produceIdShifts();

0 commit comments

Comments
 (0)