1- // https://root.cern/js/ v7.4.0
1+ // https://root.cern/js/ v7.4.1
22(function (global, factory) {
33typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
44typeof define === 'function' && define.amd ? define(['exports'], factory) :
@@ -7,11 +7,11 @@ typeof define === 'function' && define.amd ? define(['exports'], factory) :
77
88/** @summary version id
99 * @desc For the JSROOT release the string in format 'major.minor.patch' like '7.0.0' */
10- let version_id = '7.4.0 ';
10+ let version_id = '7.4.x ';
1111
1212/** @summary version date
1313 * @desc Release date in format day/month/year like '14/04/2022' */
14- let version_date = '15/06 /2023';
14+ let version_date = '4/07 /2023';
1515
1616/** @summary version id and date
1717 * @desc Produced by concatenation of {@link version_id} and {@link version_date}
@@ -62895,8 +62895,12 @@ function Prob(chi2, ndf) {
6289562895
6289662896/** @summary Gaus function
6289762897 * @memberof Math */
62898- function Gaus(x, mean, sigma) {
62899- return Math.exp(-0.5 * Math.pow((x-mean) / sigma, 2));
62898+ function Gaus(x, mean, sigma, norm) {
62899+ if (!sigma) return 1e30;
62900+ let arg = (x - mean) / sigma;
62901+ if (arg < -39 || arg > 39) return 0;
62902+ let res = Math.exp(-0.5*arg*arg);
62903+ return norm ? res/(2.50662827463100024*sigma) : res; //sqrt(2*Pi)=2.50662827463100024
6290062904}
6290162905
6290262906/** @summary BreitWigner function
@@ -63121,6 +63125,12 @@ function ChebyshevN(n, x, c) {
6312163125 return x * d1 - d2 + c[0];
6312263126}
6312363127
63128+ /** @summary Chebyshev0 function
63129+ * @memberof Math */
63130+ function Chebyshev0(x, c0) {
63131+ return c0;
63132+ }
63133+
6312463134/** @summary Chebyshev1 function
6312563135 * @memberof Math */
6312663136function Chebyshev1(x, c0, c1) {
@@ -63329,6 +63339,7 @@ BetaDist: BetaDist,
6332963339BetaDistI: BetaDistI,
6333063340BetaIncomplete: BetaIncomplete,
6333163341BreitWigner: BreitWigner,
63342+ Chebyshev0: Chebyshev0,
6333263343Chebyshev1: Chebyshev1,
6333363344Chebyshev10: Chebyshev10,
6333463345Chebyshev2: Chebyshev2,
@@ -65409,7 +65420,7 @@ function addDragHandler(_painter, arg) {
6540965420 function makeResizeElements(group, handler) {
6541065421 function addElement(cursor, d) {
6541165422 let clname = 'js_' + cursor.replace(/[-]/g, '_'),
65412- elem = group.select ('.' + clname);
65423+ elem = group.selectChild ('.' + clname);
6541365424 if (elem.empty()) elem = group.append('path').classed(clname, true);
6541465425 elem.style('opacity', 0).style('cursor', cursor).attr('d', d);
6541565426 if (handler) elem.call(handler);
@@ -65981,6 +65992,7 @@ const FrameInteractive = {
6598165992
6598265993 if (!this._frame_rotate && !this._frame_fixpos)
6598365994 addDragHandler(this, { obj: this, x: this._frame_x, y: this._frame_y, width: this.getFrameWidth(), height: this.getFrameHeight(),
65995+ is_disabled: kind => { return (kind == 'move') && this.mode3d; },
6598465996 only_resize: true, minwidth: 20, minheight: 20, redraw: () => this.sizeChanged() });
6598565997
6598665998 let main_svg = this.draw_g.select('.main_layer');
@@ -66721,7 +66733,7 @@ const FrameInteractive = {
6672166733 pnt = { x: tch[0][0], y: tch[0][1], touch: true };
6672266734 else if (ms.length === 2)
6672366735 pnt = { x: ms[0], y: ms[1], touch: false };
66724- } else if ((evnt?.x !== undefined) && (evnt?.y !== undefined)) {
66736+ } else if ((evnt?.x !== undefined) && (evnt?.y !== undefined) && (evnt?.clientX === undefined) ) {
6672566737 pnt = evnt;
6672666738 let rect = svg_node.getBoundingClientRect();
6672766739 evnt = { clientX: rect.left + pnt.x, clientY: rect.top + pnt.y };
@@ -68071,7 +68083,7 @@ class TFramePainter extends ObjectPainter {
6807168083 (!this.y_handle?.log_min_nz && ymin < logminfactorY*this.ymax) || (ymin < this.y_handle?.log_min_nz)))
6807268084 { ymin = this.ymin; cnt++; }
6807368085 if (ymax >= this.ymax) { ymax = this.ymax; cnt++; }
68074- if (cnt === 2) { zoom_y = false; unzoom_y = true; }
68086+ if (( cnt === 2) && (this.scales_ndim !== 1) ) { zoom_y = false; unzoom_y = true; }
6807568087 } else {
6807668088 unzoom_y = (ymin === ymax) && (ymin === 0);
6807768089 }
@@ -68080,7 +68092,7 @@ class TFramePainter extends ObjectPainter {
6808068092 let cnt = 0;
6808168093 if (zmin <= this.zmin) { zmin = this.zmin; cnt++; }
6808268094 if (zmax >= this.zmax) { zmax = this.zmax; cnt++; }
68083- if (cnt === 2) { zoom_z = false; unzoom_z = true; }
68095+ if (( cnt === 2) && (this.scales_ndim > 2) ) { zoom_z = false; unzoom_z = true; }
6808468096 } else {
6808568097 unzoom_z = (zmin === zmax) && (zmin === 0);
6808668098 }
@@ -70739,7 +70751,8 @@ class TPadPainter extends ObjectPainter {
7073970751 if (!this.iscan && !is_batch)
7074070752 addDragHandler(this, {
7074170753 x, y, width: w, height: h, no_transform: true,
70742- is_disabled: kind => svg_can.property('pad_enlarged') || this.btns_active_flag || (this._disable_dragging && kind == 'move'),
70754+ is_disabled: kind => svg_can.property('pad_enlarged') || this.btns_active_flag
70755+ || (kind == 'move' && (this._disable_dragging || this.getFramePainter()?.mode3d)),
7074370756 getDrawG: () => this.svg_this_pad(),
7074470757 pad_rect: { width, height },
7074570758 minwidth: 20, minheight: 20,
@@ -71519,6 +71532,7 @@ class TPadPainter extends ObjectPainter {
7151971532 padpainter.addToPadPrimitives(this.this_pad_name);
7152071533 padpainter.snapid = snap.fObjectID;
7152171534 padpainter.is_active_pad = !!snap.fActive; // enforce boolean flag
71535+ padpainter._snap_primitives = snap.fPrimitives; // keep list to be able find primitive
7152271536 padpainter._readonly = snap.fReadOnly ?? false; // readonly flag
7152371537 padpainter._has_execs = snap.fHasExecs ?? false; // are there pad execs, enables some interactive features
7152471538
@@ -86985,9 +86999,9 @@ class Toolbar {
8698586999 '.geo_toolbar_btn path { fill: rgba(0, 31, 95, 0.2); }'+
8698687000 '.geo_toolbar_btn path .active, '+
8698787001 '.geo_toolbar_btn path:hover { fill: rgba(0, 22, 72, 0.5); }'+
86988- '.geo_toolbar_btn_bright path { fill: rgba(255, 224, 160, 0.2 ); }'+
87002+ '.geo_toolbar_btn_bright path { fill: rgba(255, 224, 160, 0.8 ); }'+
8698987003 '.geo_toolbar_btn_bright path .active,'+
86990- '.geo_toolbar_btn_bright path:hover { fill: rgba (255, 233, 183, 0.5 ); }', this.element.node());
87004+ '.geo_toolbar_btn_bright path:hover { fill: rgb (255, 233, 183); }', this.element.node());
8699187005 }
8699287006
8699387007 /** @summary add buttons */
@@ -99286,10 +99300,14 @@ function treeHierarchy(node, obj) {
9928699300 return true;
9928799301 }
9928899302
99303+ // protect against corrupted TTree objects
99304+ if (obj.fBranches === undefined)
99305+ return false;
99306+
9928999307 node._childs = [];
9929099308 node._tree = obj; // set reference, will be used later by TTree::Draw
9929199309
99292- for (let i = 0; i < obj.fBranches.arr.length; ++i)
99310+ for (let i = 0; i < obj.fBranches.arr? .length; ++i)
9929399311 createBranchItem(node, obj.fBranches.arr[i], obj);
9929499312
9929599313 return true;
@@ -107637,6 +107655,8 @@ async function drawPolyLine3D() {
107637107655
107638107656 fp.toplevel.add(lines);
107639107657
107658+ fp.render3D(100);
107659+
107640107660 return true;
107641107661}
107642107662
0 commit comments