Skip to content

Commit 1b7d88f

Browse files
committed
version 7.7.5
1 parent 0b7795b commit 1b7d88f

File tree

3 files changed

+51
-22
lines changed

3 files changed

+51
-22
lines changed

build/jsroot.js

Lines changed: 48 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ typeof define === 'function' && define.amd ? define(['exports'], factory) :
88
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
99
/** @summary version id
1010
* @desc For the JSROOT release the string in format 'major.minor.patch' like '7.0.0' */
11-
const version_id = '7.7.x',
11+
const version_id = '7.7.5',
1212

1313
/** @summary version date
1414
* @desc Release date in format day/month/year like '14/04/2022' */
15-
version_date = '30/10/2024',
15+
version_date = '31/10/2024',
1616

1717
/** @summary version id and date
1818
* @desc Produced by concatenation of {@link version_id} and {@link version_date}
@@ -2603,7 +2603,7 @@ function compareValue(compare) {
26032603
}
26042604

26052605
function chord() {
2606-
return chord$1(false);
2606+
return chord$1(false, false);
26072607
}
26082608

26092609
function chord$1(directed, transpose) {
@@ -2620,7 +2620,9 @@ function chord$1(directed, transpose) {
26202620
groups = new Array(n),
26212621
k = 0, dx;
26222622

2623-
matrix = Float64Array.from({length: n * n}, (_, i) => matrix[i / n | 0][i % n]);
2623+
matrix = Float64Array.from({length: n * n}, transpose
2624+
? (_, i) => matrix[i % n][i / n | 0]
2625+
: (_, i) => matrix[i / n | 0][i % n]);
26242626

26252627
// Compute the scaling factor from value to angle in [0, 2pi].
26262628
for (let i = 0; i < n; ++i) {
@@ -2637,7 +2639,20 @@ function chord$1(directed, transpose) {
26372639
if (sortGroups) groupIndex.sort((a, b) => sortGroups(groupSums[a], groupSums[b]));
26382640
for (const i of groupIndex) {
26392641
const x0 = x;
2640-
{
2642+
if (directed) {
2643+
const subgroupIndex = range$1(~n + 1, n).filter(j => j < 0 ? matrix[~j * n + i] : matrix[i * n + j]);
2644+
if (sortSubgroups) subgroupIndex.sort((a, b) => sortSubgroups(a < 0 ? -matrix[~a * n + i] : matrix[i * n + a], b < 0 ? -matrix[~b * n + i] : matrix[i * n + b]));
2645+
for (const j of subgroupIndex) {
2646+
if (j < 0) {
2647+
const chord = chords[~j * n + i] || (chords[~j * n + i] = {source: null, target: null});
2648+
chord.target = {index: i, startAngle: x, endAngle: x += matrix[~j * n + i] * k, value: matrix[~j * n + i]};
2649+
} else {
2650+
const chord = chords[i * n + j] || (chords[i * n + j] = {source: null, target: null});
2651+
chord.source = {index: i, startAngle: x, endAngle: x += matrix[i * n + j] * k, value: matrix[i * n + j]};
2652+
}
2653+
}
2654+
groups[i] = {index: i, startAngle: x0, endAngle: x, value: groupSums[i]};
2655+
} else {
26412656
const subgroupIndex = range$1(0, n).filter(j => matrix[i * n + j] || matrix[j * n + i]);
26422657
if (sortSubgroups) subgroupIndex.sort((a, b) => sortSubgroups(matrix[i * n + a], matrix[i * n + b]));
26432658
for (const j of subgroupIndex) {
@@ -2907,7 +2922,12 @@ function ribbon(headRadius) {
29072922
context.moveTo(sr * cos$1(sa0), sr * sin$1(sa0));
29082923
context.arc(0, 0, sr, sa0, sa1);
29092924
if (sa0 !== ta0 || sa1 !== ta1) {
2910-
{
2925+
if (headRadius) {
2926+
var hr = +headRadius.apply(this, arguments), tr2 = tr - hr, ta2 = (ta0 + ta1) / 2;
2927+
context.quadraticCurveTo(0, 0, tr2 * cos$1(ta0), tr2 * sin$1(ta0));
2928+
context.lineTo(tr * cos$1(ta2), tr * sin$1(ta2));
2929+
context.lineTo(tr2 * cos$1(ta1), tr2 * sin$1(ta1));
2930+
} else {
29112931
context.quadraticCurveTo(0, 0, tr * cos$1(ta0), tr * sin$1(ta0));
29122932
context.arc(0, 0, tr, ta0, ta1);
29132933
}
@@ -2918,6 +2938,10 @@ function ribbon(headRadius) {
29182938
if (buffer) return context = null, buffer + "" || null;
29192939
}
29202940

2941+
if (headRadius) ribbon.headRadius = function(_) {
2942+
return arguments.length ? (headRadius = typeof _ === "function" ? _ : constant$4(+_), ribbon) : headRadius;
2943+
};
2944+
29212945
ribbon.radius = function(_) {
29222946
return arguments.length ? (sourceRadius = targetRadius = typeof _ === "function" ? _ : constant$4(+_), ribbon) : sourceRadius;
29232947
};
@@ -9805,7 +9829,7 @@ function createDefaultPalette(grayscale) {
98059829
if (t < 2 / 3) return p + (q - p) * (2/3 - t) * 6;
98069830
return p;
98079831
}, HLStoRGB = (h, l, s) => {
9808-
const q = l + s - l * s,
9832+
const q = (l < 0.5) ? l * (1 + s) : l + s - l * s,
98099833
p = 2 * l - q,
98109834
r = hue2rgb(p, q, h + 1/3),
98119835
g = hue2rgb(p, q, h),
@@ -56017,6 +56041,13 @@ function getMaterialArgs(color$1, args) {
5601756041
}
5601856042

5601956043
function createSVGRenderer(as_is, precision, doc) {
56044+
if (as_is) {
56045+
if (doc !== undefined)
56046+
globalThis.docuemnt = doc;
56047+
const rndr = new SVGRenderer();
56048+
rndr.setPrecision(precision);
56049+
return rndr;
56050+
}
5602056051

5602156052
const excl_style1 = ';stroke-opacity:1;stroke-width:1;stroke-linecap:round',
5602256053
excl_style2 = ';fill-opacity:1',
@@ -56420,7 +56451,7 @@ async function createRender3D(width, height, render3d, args) {
5642056451

5642156452
if (render3d === rc.SVG) {
5642256453
// SVG rendering
56423-
const r = createSVGRenderer(false, 0);
56454+
const r = createSVGRenderer(false, 0, doc);
5642456455
r.jsroot_dom = doc.createElementNS('http://www.w3.org/2000/svg', 'svg');
5642556456
promise = Promise.resolve(r);
5642656457
} else if (isNodeJs()) {
@@ -61682,14 +61713,14 @@ class StandaloneMenu extends JSRootMenu {
6168261713
* menu.addchk(flag, 'Checked', arg => console.log(`Now flag is ${arg}`));
6168361714
* menu.show(); */
6168461715
function createMenu(evnt, handler, menuname) {
61685-
const menu = new StandaloneMenu(handler, 'root_ctx_menu', evnt);
61716+
const menu = new StandaloneMenu(handler, menuname || 'root_ctx_menu', evnt);
6168661717
return menu.load();
6168761718
}
6168861719

6168961720
/** @summary Close previousely created and shown JSROOT menu
6169061721
* @param {string} [menuname] - optional menu name */
6169161722
function closeMenu(menuname) {
61692-
const element = getDocument().getElementById('root_ctx_menu');
61723+
const element = getDocument().getElementById(menuname || 'root_ctx_menu');
6169361724
element?.remove();
6169461725
return !!element;
6169561726
}
@@ -76187,7 +76218,7 @@ let TH2Painter$2 = class TH2Painter extends THistPainter {
7618776218
res.wmax = 0;
7618876219
res.integral = stat_sum0;
7618976220

76190-
if (histo.fEntries > 1)
76221+
if (histo.fEntries > 0)
7619176222
res.entries = histo.fEntries;
7619276223

7619376224
res.eff_entries = stat_sumw2 ? stat_sum0*stat_sum0/stat_sumw2 : Math.abs(stat_sum0);
@@ -79010,7 +79041,7 @@ function render3D(tmout) {
7901079041
if (tmout === -1111) {
7901179042
// special handling for direct SVG renderer
7901279043
const doc = getDocument(),
79013-
rrr = createSVGRenderer(false, 0);
79044+
rrr = createSVGRenderer(false, 0, doc);
7901479045
rrr.setSize(this.scene_width, this.scene_height);
7901579046
rrr.render(this.scene, this.camera);
7901679047
if (rrr.makeOuterHTML) {
@@ -80808,7 +80839,7 @@ let TH1Painter$2 = class TH1Painter extends THistPainter {
8080880839
else
8080980840
hsum += histo.getBinContent(0) + histo.getBinContent(this.nbinsx + 1);
8081080841

80811-
this.stat_entries = (histo.fEntries > 1) ? histo.fEntries : hsum;
80842+
this.stat_entries = hsum;
8081280843

8081380844
this.hmin = hmin;
8081480845
this.hmax = hmax;
@@ -80919,7 +80950,8 @@ let TH1Painter$2 = class TH1Painter extends THistPainter {
8091980950
right = this.getSelectIndex('x', 'right'),
8092080951
fp = this.getFramePainter(),
8092180952
res = { name: histo.fName, meanx: 0, meany: 0, rmsx: 0, rmsy: 0, integral: 0,
80922-
entries: this.stat_entries, eff_entries: 0, xmax: 0, wmax: 0, skewx: 0, skewd: 0, kurtx: 0, kurtd: 0 },
80953+
entries: (histo.fEntries > 0) ? histo.fEntries : this.stat_entries,
80954+
eff_entries: 0, xmax: 0, wmax: 0, skewx: 0, skewd: 0, kurtx: 0, kurtd: 0 },
8092380955
has_counted_stat = !fp.isAxisZoomed('x') && (Math.abs(histo.fTsumw) > 1e-300);
8092480956
let stat_sumw = 0, stat_sumw2 = 0, stat_sumwx = 0, stat_sumwx2 = 0, stat_sumwy = 0, stat_sumwy2 = 0,
8092580957
i, xx = 0, w = 0, xmax = null, wmax = null;
@@ -82458,7 +82490,7 @@ class TH3Painter extends THistPainter {
8245882490

8245982491
res.integral = stat_sum0;
8246082492

82461-
if (histo.fEntries > 1)
82493+
if (histo.fEntries > 0)
8246282494
res.entries = histo.fEntries;
8246382495

8246482496
res.eff_entries = stat_sumw2 ? stat_sum0*stat_sum0/stat_sumw2 : Math.abs(stat_sum0);
@@ -120909,7 +120941,7 @@ class Sha256 {
120909120941
function sha256(message, as_hex) {
120910120942
const m = new Sha256(false);
120911120943
m.update(message);
120912-
return m.digest();
120944+
return as_hex ? m.hex() : m.digest();
120913120945
}
120914120946

120915120947
function sha256_2(message, arr, as_hex) {
@@ -126772,9 +126804,6 @@ class RH3Painter extends RHistPainter {
126772126804

126773126805
res.integral = stat_sum0;
126774126806

126775-
if (histo.fEntries > 1)
126776-
res.entries = histo.fEntries;
126777-
126778126807
return res;
126779126808
}
126780126809

changes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# JSROOT changelog
22

3-
## Changes in 7.7.x
3+
## Changes in 7.7.5
44
1. Fix - can enable exponent only for log10 axis scale
55
2. Fix - proper set custom font size in latex
66
3. Fix - do not force style 8 for hist markers

modules/core.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
/** @summary version id
22
* @desc For the JSROOT release the string in format 'major.minor.patch' like '7.0.0' */
3-
const version_id = '7.7.x',
3+
const version_id = '7.7.5',
44

55
/** @summary version date
66
* @desc Release date in format day/month/year like '14/04/2022' */
7-
version_date = '30/10/2024',
7+
version_date = '31/10/2024',
88

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

0 commit comments

Comments
 (0)