@@ -8,11 +8,11 @@ typeof define === 'function' && define.amd ? define(['exports'], factory) :
8
8
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
9
9
/** @summary version id
10
10
* @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 ',
12
12
13
13
/** @summary version date
14
14
* @desc Release date in format day/month/year like '14/04/2022' */
15
- version_date = '30 /10/2024',
15
+ version_date = '31 /10/2024',
16
16
17
17
/** @summary version id and date
18
18
* @desc Produced by concatenation of {@link version_id} and {@link version_date}
@@ -2603,7 +2603,7 @@ function compareValue(compare) {
2603
2603
}
2604
2604
2605
2605
function chord() {
2606
- return chord$1(false);
2606
+ return chord$1(false, false );
2607
2607
}
2608
2608
2609
2609
function chord$1(directed, transpose) {
@@ -2620,7 +2620,9 @@ function chord$1(directed, transpose) {
2620
2620
groups = new Array(n),
2621
2621
k = 0, dx;
2622
2622
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]);
2624
2626
2625
2627
// Compute the scaling factor from value to angle in [0, 2pi].
2626
2628
for (let i = 0; i < n; ++i) {
@@ -2637,7 +2639,20 @@ function chord$1(directed, transpose) {
2637
2639
if (sortGroups) groupIndex.sort((a, b) => sortGroups(groupSums[a], groupSums[b]));
2638
2640
for (const i of groupIndex) {
2639
2641
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 {
2641
2656
const subgroupIndex = range$1(0, n).filter(j => matrix[i * n + j] || matrix[j * n + i]);
2642
2657
if (sortSubgroups) subgroupIndex.sort((a, b) => sortSubgroups(matrix[i * n + a], matrix[i * n + b]));
2643
2658
for (const j of subgroupIndex) {
@@ -2907,7 +2922,12 @@ function ribbon(headRadius) {
2907
2922
context.moveTo(sr * cos$1(sa0), sr * sin$1(sa0));
2908
2923
context.arc(0, 0, sr, sa0, sa1);
2909
2924
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 {
2911
2931
context.quadraticCurveTo(0, 0, tr * cos$1(ta0), tr * sin$1(ta0));
2912
2932
context.arc(0, 0, tr, ta0, ta1);
2913
2933
}
@@ -2918,6 +2938,10 @@ function ribbon(headRadius) {
2918
2938
if (buffer) return context = null, buffer + "" || null;
2919
2939
}
2920
2940
2941
+ if (headRadius) ribbon.headRadius = function(_) {
2942
+ return arguments.length ? (headRadius = typeof _ === "function" ? _ : constant$4(+_), ribbon) : headRadius;
2943
+ };
2944
+
2921
2945
ribbon.radius = function(_) {
2922
2946
return arguments.length ? (sourceRadius = targetRadius = typeof _ === "function" ? _ : constant$4(+_), ribbon) : sourceRadius;
2923
2947
};
@@ -9805,7 +9829,7 @@ function createDefaultPalette(grayscale) {
9805
9829
if (t < 2 / 3) return p + (q - p) * (2/3 - t) * 6;
9806
9830
return p;
9807
9831
}, HLStoRGB = (h, l, s) => {
9808
- const q = l + s - l * s,
9832
+ const q = (l < 0.5) ? l * (1 + s) : l + s - l * s,
9809
9833
p = 2 * l - q,
9810
9834
r = hue2rgb(p, q, h + 1/3),
9811
9835
g = hue2rgb(p, q, h),
@@ -56017,6 +56041,13 @@ function getMaterialArgs(color$1, args) {
56017
56041
}
56018
56042
56019
56043
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
+ }
56020
56051
56021
56052
const excl_style1 = ';stroke-opacity:1;stroke-width:1;stroke-linecap:round',
56022
56053
excl_style2 = ';fill-opacity:1',
@@ -56420,7 +56451,7 @@ async function createRender3D(width, height, render3d, args) {
56420
56451
56421
56452
if (render3d === rc.SVG) {
56422
56453
// SVG rendering
56423
- const r = createSVGRenderer(false, 0);
56454
+ const r = createSVGRenderer(false, 0, doc );
56424
56455
r.jsroot_dom = doc.createElementNS('http://www.w3.org/2000/svg', 'svg');
56425
56456
promise = Promise.resolve(r);
56426
56457
} else if (isNodeJs()) {
@@ -61682,14 +61713,14 @@ class StandaloneMenu extends JSRootMenu {
61682
61713
* menu.addchk(flag, 'Checked', arg => console.log(`Now flag is ${arg}`));
61683
61714
* menu.show(); */
61684
61715
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);
61686
61717
return menu.load();
61687
61718
}
61688
61719
61689
61720
/** @summary Close previousely created and shown JSROOT menu
61690
61721
* @param {string} [menuname] - optional menu name */
61691
61722
function closeMenu(menuname) {
61692
- const element = getDocument().getElementById('root_ctx_menu');
61723
+ const element = getDocument().getElementById(menuname || 'root_ctx_menu');
61693
61724
element?.remove();
61694
61725
return !!element;
61695
61726
}
@@ -76187,7 +76218,7 @@ let TH2Painter$2 = class TH2Painter extends THistPainter {
76187
76218
res.wmax = 0;
76188
76219
res.integral = stat_sum0;
76189
76220
76190
- if (histo.fEntries > 1 )
76221
+ if (histo.fEntries > 0 )
76191
76222
res.entries = histo.fEntries;
76192
76223
76193
76224
res.eff_entries = stat_sumw2 ? stat_sum0*stat_sum0/stat_sumw2 : Math.abs(stat_sum0);
@@ -79010,7 +79041,7 @@ function render3D(tmout) {
79010
79041
if (tmout === -1111) {
79011
79042
// special handling for direct SVG renderer
79012
79043
const doc = getDocument(),
79013
- rrr = createSVGRenderer(false, 0);
79044
+ rrr = createSVGRenderer(false, 0, doc );
79014
79045
rrr.setSize(this.scene_width, this.scene_height);
79015
79046
rrr.render(this.scene, this.camera);
79016
79047
if (rrr.makeOuterHTML) {
@@ -80808,7 +80839,7 @@ let TH1Painter$2 = class TH1Painter extends THistPainter {
80808
80839
else
80809
80840
hsum += histo.getBinContent(0) + histo.getBinContent(this.nbinsx + 1);
80810
80841
80811
- this.stat_entries = (histo.fEntries > 1) ? histo.fEntries : hsum;
80842
+ this.stat_entries = hsum;
80812
80843
80813
80844
this.hmin = hmin;
80814
80845
this.hmax = hmax;
@@ -80919,7 +80950,8 @@ let TH1Painter$2 = class TH1Painter extends THistPainter {
80919
80950
right = this.getSelectIndex('x', 'right'),
80920
80951
fp = this.getFramePainter(),
80921
80952
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 },
80923
80955
has_counted_stat = !fp.isAxisZoomed('x') && (Math.abs(histo.fTsumw) > 1e-300);
80924
80956
let stat_sumw = 0, stat_sumw2 = 0, stat_sumwx = 0, stat_sumwx2 = 0, stat_sumwy = 0, stat_sumwy2 = 0,
80925
80957
i, xx = 0, w = 0, xmax = null, wmax = null;
@@ -82458,7 +82490,7 @@ class TH3Painter extends THistPainter {
82458
82490
82459
82491
res.integral = stat_sum0;
82460
82492
82461
- if (histo.fEntries > 1 )
82493
+ if (histo.fEntries > 0 )
82462
82494
res.entries = histo.fEntries;
82463
82495
82464
82496
res.eff_entries = stat_sumw2 ? stat_sum0*stat_sum0/stat_sumw2 : Math.abs(stat_sum0);
@@ -120909,7 +120941,7 @@ class Sha256 {
120909
120941
function sha256(message, as_hex) {
120910
120942
const m = new Sha256(false);
120911
120943
m.update(message);
120912
- return m.digest();
120944
+ return as_hex ? m.hex() : m.digest();
120913
120945
}
120914
120946
120915
120947
function sha256_2(message, arr, as_hex) {
@@ -126772,9 +126804,6 @@ class RH3Painter extends RHistPainter {
126772
126804
126773
126805
res.integral = stat_sum0;
126774
126806
126775
- if (histo.fEntries > 1)
126776
- res.entries = histo.fEntries;
126777
-
126778
126807
return res;
126779
126808
}
126780
126809
0 commit comments