Skip to content

Commit 9a9232b

Browse files
committed
Build 7.7.4
1 parent 4534014 commit 9a9232b

File tree

2 files changed

+48
-15
lines changed

2 files changed

+48
-15
lines changed

build/jsroot.js

Lines changed: 46 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@ typeof define === 'function' && define.amd ? define(['exports'], factory) :
55
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.JSROOT = global.JSROOT || {}));
66
})(this, (function (exports) { 'use strict';
77

8+
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
89
/** @summary version id
910
* @desc For the JSROOT release the string in format 'major.minor.patch' like '7.0.0' */
10-
const version_id = '7.7.x',
11+
const version_id = '7.7.4',
1112

1213
/** @summary version date
1314
* @desc Release date in format day/month/year like '14/04/2022' */
14-
version_date = '24/09/2024',
15+
version_date = '30/09/2024',
1516

1617
/** @summary version id and date
1718
* @desc Produced by concatenation of {@link version_id} and {@link version_date}
@@ -29,7 +30,8 @@ internals = {
2930
id_counter: 1
3031
},
3132

32-
_src = (typeof document === 'undefined' && typeof location === 'undefined' ? undefined : typeof document === 'undefined' ? location.href : (document.currentScript && document.currentScript.src || new URL('jsroot.js', document.baseURI).href));
33+
_src = (typeof document === 'undefined' && typeof location === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : typeof document === 'undefined' ? location.href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('jsroot.js', document.baseURI).href));
34+
3335

3436
/** @summary Location of JSROOT modules
3537
* @desc Automatically detected and used to dynamically load other modules
@@ -2601,7 +2603,7 @@ function compareValue(compare) {
26012603
}
26022604

26032605
function chord() {
2604-
return chord$1(false);
2606+
return chord$1(false, false);
26052607
}
26062608

26072609
function chord$1(directed, transpose) {
@@ -2618,7 +2620,9 @@ function chord$1(directed, transpose) {
26182620
groups = new Array(n),
26192621
k = 0, dx;
26202622

2621-
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]);
26222626

26232627
// Compute the scaling factor from value to angle in [0, 2pi].
26242628
for (let i = 0; i < n; ++i) {
@@ -2635,7 +2639,20 @@ function chord$1(directed, transpose) {
26352639
if (sortGroups) groupIndex.sort((a, b) => sortGroups(groupSums[a], groupSums[b]));
26362640
for (const i of groupIndex) {
26372641
const x0 = x;
2638-
{
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 {
26392656
const subgroupIndex = range$1(0, n).filter(j => matrix[i * n + j] || matrix[j * n + i]);
26402657
if (sortSubgroups) subgroupIndex.sort((a, b) => sortSubgroups(matrix[i * n + a], matrix[i * n + b]));
26412658
for (const j of subgroupIndex) {
@@ -2905,7 +2922,12 @@ function ribbon(headRadius) {
29052922
context.moveTo(sr * cos$1(sa0), sr * sin$1(sa0));
29062923
context.arc(0, 0, sr, sa0, sa1);
29072924
if (sa0 !== ta0 || sa1 !== ta1) {
2908-
{
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 {
29092931
context.quadraticCurveTo(0, 0, tr * cos$1(ta0), tr * sin$1(ta0));
29102932
context.arc(0, 0, tr, ta0, ta1);
29112933
}
@@ -2916,6 +2938,10 @@ function ribbon(headRadius) {
29162938
if (buffer) return context = null, buffer + "" || null;
29172939
}
29182940

2941+
if (headRadius) ribbon.headRadius = function(_) {
2942+
return arguments.length ? (headRadius = typeof _ === "function" ? _ : constant$4(+_), ribbon) : headRadius;
2943+
};
2944+
29192945
ribbon.radius = function(_) {
29202946
return arguments.length ? (sourceRadius = targetRadius = typeof _ === "function" ? _ : constant$4(+_), ribbon) : sourceRadius;
29212947
};
@@ -9803,7 +9829,7 @@ function createDefaultPalette(grayscale) {
98039829
if (t < 2 / 3) return p + (q - p) * (2/3 - t) * 6;
98049830
return p;
98059831
}, HLStoRGB = (h, l, s) => {
9806-
const q = l + s - l * s,
9832+
const q = (l < 0.5) ? l * (1 + s) : l + s - l * s,
98079833
p = 2 * l - q,
98089834
r = hue2rgb(p, q, h + 1/3),
98099835
g = hue2rgb(p, q, h),
@@ -56015,6 +56041,13 @@ function getMaterialArgs(color$1, args) {
5601556041
}
5601656042

5601756043
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+
}
5601856051

5601956052
const excl_style1 = ';stroke-opacity:1;stroke-width:1;stroke-linecap:round',
5602056053
excl_style2 = ';fill-opacity:1',
@@ -56418,7 +56451,7 @@ async function createRender3D(width, height, render3d, args) {
5641856451

5641956452
if (render3d === rc.SVG) {
5642056453
// SVG rendering
56421-
const r = createSVGRenderer(false, 0);
56454+
const r = createSVGRenderer(false, 0, doc);
5642256455
r.jsroot_dom = doc.createElementNS('http://www.w3.org/2000/svg', 'svg');
5642356456
promise = Promise.resolve(r);
5642456457
} else if (isNodeJs()) {
@@ -61680,14 +61713,14 @@ class StandaloneMenu extends JSRootMenu {
6168061713
* menu.addchk(flag, 'Checked', arg => console.log(`Now flag is ${arg}`));
6168161714
* menu.show(); */
6168261715
function createMenu(evnt, handler, menuname) {
61683-
const menu = new StandaloneMenu(handler, 'root_ctx_menu', evnt);
61716+
const menu = new StandaloneMenu(handler, menuname || 'root_ctx_menu', evnt);
6168461717
return menu.load();
6168561718
}
6168661719

6168761720
/** @summary Close previousely created and shown JSROOT menu
6168861721
* @param {string} [menuname] - optional menu name */
6168961722
function closeMenu(menuname) {
61690-
const element = getDocument().getElementById('root_ctx_menu');
61723+
const element = getDocument().getElementById(menuname || 'root_ctx_menu');
6169161724
element?.remove();
6169261725
return !!element;
6169361726
}
@@ -79007,7 +79040,7 @@ function render3D(tmout) {
7900779040
if (tmout === -1111) {
7900879041
// special handling for direct SVG renderer
7900979042
const doc = getDocument(),
79010-
rrr = createSVGRenderer(false, 0);
79043+
rrr = createSVGRenderer(false, 0, doc);
7901179044
rrr.setSize(this.scene_width, this.scene_height);
7901279045
rrr.render(this.scene, this.camera);
7901379046
if (rrr.makeOuterHTML) {
@@ -120886,7 +120919,7 @@ class Sha256 {
120886120919
function sha256(message, as_hex) {
120887120920
const m = new Sha256(false);
120888120921
m.update(message);
120889-
return m.digest();
120922+
return as_hex ? m.hex() : m.digest();
120890120923
}
120891120924

120892120925
function sha256_2(message, arr, as_hex) {

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.4',
44

55
/** @summary version date
66
* @desc Release date in format day/month/year like '14/04/2022' */
7-
version_date = '24/09/2024',
7+
version_date = '30/09/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)