Skip to content

Commit

Permalink
version 7.7.5
Browse files Browse the repository at this point in the history
  • Loading branch information
linev committed Oct 31, 2024
1 parent 0b7795b commit 1b7d88f
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 22 deletions.
67 changes: 48 additions & 19 deletions build/jsroot.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ typeof define === 'function' && define.amd ? define(['exports'], factory) :
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.5',

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

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

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

function chord$1(directed, transpose) {
Expand All @@ -2620,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 @@ -2637,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 @@ -2907,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 @@ -2918,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 @@ -9805,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 @@ -56017,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 @@ -56420,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 @@ -61682,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 @@ -76187,7 +76218,7 @@ let TH2Painter$2 = class TH2Painter extends THistPainter {
res.wmax = 0;
res.integral = stat_sum0;

if (histo.fEntries > 1)
if (histo.fEntries > 0)
res.entries = histo.fEntries;

res.eff_entries = stat_sumw2 ? stat_sum0*stat_sum0/stat_sumw2 : Math.abs(stat_sum0);
Expand Down Expand Up @@ -79010,7 +79041,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 @@ -80808,7 +80839,7 @@ let TH1Painter$2 = class TH1Painter extends THistPainter {
else
hsum += histo.getBinContent(0) + histo.getBinContent(this.nbinsx + 1);

this.stat_entries = (histo.fEntries > 1) ? histo.fEntries : hsum;
this.stat_entries = hsum;

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

res.integral = stat_sum0;

if (histo.fEntries > 1)
if (histo.fEntries > 0)
res.entries = histo.fEntries;

res.eff_entries = stat_sumw2 ? stat_sum0*stat_sum0/stat_sumw2 : Math.abs(stat_sum0);
Expand Down Expand Up @@ -120909,7 +120941,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 Expand Up @@ -126772,9 +126804,6 @@ class RH3Painter extends RHistPainter {

res.integral = stat_sum0;

if (histo.fEntries > 1)
res.entries = histo.fEntries;

return res;
}

Expand Down
2 changes: 1 addition & 1 deletion changes.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# JSROOT changelog

## Changes in 7.7.x
## Changes in 7.7.5
1. Fix - can enable exponent only for log10 axis scale
2. Fix - proper set custom font size in latex
3. Fix - do not force style 8 for hist markers
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.5',

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

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

0 comments on commit 1b7d88f

Please sign in to comment.