Skip to content

Commit

Permalink
Build 7.7.4
Browse files Browse the repository at this point in the history
  • Loading branch information
linev committed Sep 30, 2024
1 parent 4534014 commit 9a9232b
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 15 deletions.
59 changes: 46 additions & 13 deletions build/jsroot.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ typeof define === 'function' && define.amd ? define(['exports'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.JSROOT = global.JSROOT || {}));
})(this, (function (exports) { 'use strict';

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

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

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

_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));
_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));


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

function chord() {
return chord$1(false);
return chord$1(false, false);
}

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

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

// Compute the scaling factor from value to angle in [0, 2pi].
for (let i = 0; i < n; ++i) {
Expand All @@ -2635,7 +2639,20 @@ function chord$1(directed, transpose) {
if (sortGroups) groupIndex.sort((a, b) => sortGroups(groupSums[a], groupSums[b]));
for (const i of groupIndex) {
const x0 = x;
{
if (directed) {
const subgroupIndex = range$1(~n + 1, n).filter(j => j < 0 ? matrix[~j * n + i] : matrix[i * n + j]);
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]));
for (const j of subgroupIndex) {
if (j < 0) {
const chord = chords[~j * n + i] || (chords[~j * n + i] = {source: null, target: null});
chord.target = {index: i, startAngle: x, endAngle: x += matrix[~j * n + i] * k, value: matrix[~j * n + i]};
} else {
const chord = chords[i * n + j] || (chords[i * n + j] = {source: null, target: null});
chord.source = {index: i, startAngle: x, endAngle: x += matrix[i * n + j] * k, value: matrix[i * n + j]};
}
}
groups[i] = {index: i, startAngle: x0, endAngle: x, value: groupSums[i]};
} else {
const subgroupIndex = range$1(0, n).filter(j => matrix[i * n + j] || matrix[j * n + i]);
if (sortSubgroups) subgroupIndex.sort((a, b) => sortSubgroups(matrix[i * n + a], matrix[i * n + b]));
for (const j of subgroupIndex) {
Expand Down Expand Up @@ -2905,7 +2922,12 @@ function ribbon(headRadius) {
context.moveTo(sr * cos$1(sa0), sr * sin$1(sa0));
context.arc(0, 0, sr, sa0, sa1);
if (sa0 !== ta0 || sa1 !== ta1) {
{
if (headRadius) {
var hr = +headRadius.apply(this, arguments), tr2 = tr - hr, ta2 = (ta0 + ta1) / 2;
context.quadraticCurveTo(0, 0, tr2 * cos$1(ta0), tr2 * sin$1(ta0));
context.lineTo(tr * cos$1(ta2), tr * sin$1(ta2));
context.lineTo(tr2 * cos$1(ta1), tr2 * sin$1(ta1));
} else {
context.quadraticCurveTo(0, 0, tr * cos$1(ta0), tr * sin$1(ta0));
context.arc(0, 0, tr, ta0, ta1);
}
Expand All @@ -2916,6 +2938,10 @@ function ribbon(headRadius) {
if (buffer) return context = null, buffer + "" || null;
}

if (headRadius) ribbon.headRadius = function(_) {
return arguments.length ? (headRadius = typeof _ === "function" ? _ : constant$4(+_), ribbon) : headRadius;
};

ribbon.radius = function(_) {
return arguments.length ? (sourceRadius = targetRadius = typeof _ === "function" ? _ : constant$4(+_), ribbon) : sourceRadius;
};
Expand Down Expand Up @@ -9803,7 +9829,7 @@ function createDefaultPalette(grayscale) {
if (t < 2 / 3) return p + (q - p) * (2/3 - t) * 6;
return p;
}, HLStoRGB = (h, l, s) => {
const q = l + s - l * s,
const q = (l < 0.5) ? l * (1 + s) : l + s - l * s,
p = 2 * l - q,
r = hue2rgb(p, q, h + 1/3),
g = hue2rgb(p, q, h),
Expand Down Expand Up @@ -56015,6 +56041,13 @@ function getMaterialArgs(color$1, args) {
}

function createSVGRenderer(as_is, precision, doc) {
if (as_is) {
if (doc !== undefined)
globalThis.docuemnt = doc;
const rndr = new SVGRenderer();
rndr.setPrecision(precision);
return rndr;
}

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

if (render3d === rc.SVG) {
// SVG rendering
const r = createSVGRenderer(false, 0);
const r = createSVGRenderer(false, 0, doc);
r.jsroot_dom = doc.createElementNS('http://www.w3.org/2000/svg', 'svg');
promise = Promise.resolve(r);
} else if (isNodeJs()) {
Expand Down Expand Up @@ -61680,14 +61713,14 @@ class StandaloneMenu extends JSRootMenu {
* menu.addchk(flag, 'Checked', arg => console.log(`Now flag is ${arg}`));
* menu.show(); */
function createMenu(evnt, handler, menuname) {
const menu = new StandaloneMenu(handler, 'root_ctx_menu', evnt);
const menu = new StandaloneMenu(handler, menuname || 'root_ctx_menu', evnt);
return menu.load();
}

/** @summary Close previousely created and shown JSROOT menu
* @param {string} [menuname] - optional menu name */
function closeMenu(menuname) {
const element = getDocument().getElementById('root_ctx_menu');
const element = getDocument().getElementById(menuname || 'root_ctx_menu');
element?.remove();
return !!element;
}
Expand Down Expand Up @@ -79007,7 +79040,7 @@ function render3D(tmout) {
if (tmout === -1111) {
// special handling for direct SVG renderer
const doc = getDocument(),
rrr = createSVGRenderer(false, 0);
rrr = createSVGRenderer(false, 0, doc);
rrr.setSize(this.scene_width, this.scene_height);
rrr.render(this.scene, this.camera);
if (rrr.makeOuterHTML) {
Expand Down Expand Up @@ -120886,7 +120919,7 @@ class Sha256 {
function sha256(message, as_hex) {
const m = new Sha256(false);
m.update(message);
return m.digest();
return as_hex ? m.hex() : m.digest();
}

function sha256_2(message, arr, as_hex) {
Expand Down
4 changes: 2 additions & 2 deletions modules/core.mjs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/** @summary version id
* @desc For the JSROOT release the string in format 'major.minor.patch' like '7.0.0' */
const version_id = '7.7.x',
const version_id = '7.7.4',

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

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

0 comments on commit 9a9232b

Please sign in to comment.