1- // https://root.cern/js/ v7.8.1
1+ // https://root.cern/js/ v7.8.2
22(function (global, factory) {
33typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
44typeof define === 'function' && define.amd ? define(['exports'], factory) :
@@ -8,11 +8,11 @@ typeof define === 'function' && define.amd ? define(['exports'], factory) :
88var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
99/** @summary version id
1010 * @desc For the JSROOT release the string in format 'major.minor.patch' like '7.0.0' */
11- const version_id = '7.8.1 ',
11+ const version_id = '7.8.x ',
1212
1313/** @summary version date
1414 * @desc Release date in format day/month/year like '14/04/2022' */
15- version_date = '22/01 /2025',
15+ version_date = '10/03 /2025',
1616
1717/** @summary version id and date
1818 * @desc Produced by concatenation of {@link version_id} and {@link version_date}
@@ -9325,7 +9325,7 @@ async function loadFontFile(fname) {
93259325
93269326 if (entry?.promises !== undefined) {
93279327 return new Promise(resolveFunc => {
9328- cfg .promises.push(resolveFunc);
9328+ entry .promises.push(resolveFunc);
93299329 });
93309330 }
93319331
@@ -69361,8 +69361,10 @@ class TPadPainter extends ObjectPainter {
6936169361 this.createAttFill({ attr: this.pad });
6936269362
6936369363 if ((rect.width <= lmt) || (rect.height <= lmt)) {
69364- svg.style('display', 'none');
69365- console.warn(`Hide canvas while geometry too small w=${rect.width} h=${rect.height}`);
69364+ if (this.snapid === undefined) {
69365+ svg.style('display', 'none');
69366+ console.warn(`Hide canvas while geometry too small w=${rect.width} h=${rect.height}`);
69367+ }
6936669368 if (this._pad_width && this._pad_height) {
6936769369 // use last valid dimensions
6936869370 rect.width = this._pad_width;
@@ -70558,7 +70560,7 @@ class TPadPainter extends ObjectPainter {
7055870560
7055970561 const mainid = this.selectDom().attr('id');
7056070562
70561- if (!this.isBatchMode() && !this.use_openui && !this.brlayout && mainid && isStr(mainid) && !getHPainter()) {
70563+ if (!this.isBatchMode() && this.online_canvas && !this.use_openui && !this.brlayout && mainid && isStr(mainid) && !getHPainter()) {
7056270564 this.brlayout = new BrowserLayout(mainid, null, this);
7056370565 this.brlayout.create(mainid, true);
7056470566 this.setDom(this.brlayout.drawing_divid()); // need to create canvas
@@ -85231,16 +85233,16 @@ function createNormal(axis_name, pos, size) {
8523185233 return new Geometry(node);
8523285234}
8523385235
85234- const cfg$1 = {
85236+ const cfg = {
8523585237 GradPerSegm: 6, // grad per segment in cylinder/spherical symmetry shapes
8523685238 CompressComp: true // use faces compression in composite shapes
8523785239};
8523885240
8523985241function geoCfg(name, value) {
8524085242 if (value === undefined)
85241- return cfg$1 [name];
85243+ return cfg[name];
8524285244
85243- cfg$1 [name] = value;
85245+ cfg[name] = value;
8524485246}
8524585247
8524685248const kindGeo = 0, // TGeoNode / TGeoShape
@@ -86127,7 +86129,7 @@ function createTubeBuffer(shape, faces_limit) {
8612786129 thetaLength = shape.fPhi2 - shape.fPhi1;
8612886130 }
8612986131
86130- const radiusSegments = Math.max(4, Math.round(thetaLength/cfg$1 .GradPerSegm));
86132+ const radiusSegments = Math.max(4, Math.round(thetaLength/cfg.GradPerSegm));
8613186133
8613286134 // external surface
8613386135 let numfaces = radiusSegments * (((outerR[0] <= 0) || (outerR[1] <= 0)) ? 1 : 2);
@@ -86249,7 +86251,7 @@ function createTubeBuffer(shape, faces_limit) {
8624986251/** @summary Creates eltu geometry
8625086252 * @private */
8625186253function createEltuBuffer(shape, faces_limit) {
86252- const radiusSegments = Math.max(4, Math.round(360/cfg$1 .GradPerSegm));
86254+ const radiusSegments = Math.max(4, Math.round(360/cfg.GradPerSegm));
8625386255
8625486256 if (faces_limit < 0) return radiusSegments*4;
8625586257
@@ -86300,8 +86302,8 @@ function createEltuBuffer(shape, faces_limit) {
8630086302 * @private */
8630186303function createTorusBuffer(shape, faces_limit) {
8630286304 const radius = shape.fR;
86303- let radialSegments = Math.max(6, Math.round(360/cfg$1 .GradPerSegm)),
86304- tubularSegments = Math.max(8, Math.round(shape.fDphi/cfg$1 .GradPerSegm)),
86305+ let radialSegments = Math.max(6, Math.round(360/cfg.GradPerSegm)),
86306+ tubularSegments = Math.max(8, Math.round(shape.fDphi/cfg.GradPerSegm)),
8630586307 numfaces = (shape.fRmin > 0 ? 4 : 2) * radialSegments * (tubularSegments + (shape.fDphi !== 360 ? 1 : 0));
8630686308
8630786309 if (faces_limit < 0) return numfaces;
@@ -86399,7 +86401,7 @@ function createPolygonBuffer(shape, faces_limit) {
8639986401 radiusSegments = shape.fNedges;
8640086402 factor = 1.0 / Math.cos(Math.PI/180 * thetaLength / radiusSegments / 2);
8640186403 } else {
86402- radiusSegments = Math.max(5, Math.round(thetaLength/cfg$1 .GradPerSegm));
86404+ radiusSegments = Math.max(5, Math.round(thetaLength/cfg.GradPerSegm));
8640386405 factor = 1;
8640486406 }
8640586407
@@ -86626,7 +86628,7 @@ function createXtruBuffer(shape, faces_limit) {
8662686628/** @summary Creates para geometry
8662786629 * @private */
8662886630function createParaboloidBuffer(shape, faces_limit) {
86629- let radiusSegments = Math.max(4, Math.round(360/cfg$1 .GradPerSegm)),
86631+ let radiusSegments = Math.max(4, Math.round(360/cfg.GradPerSegm)),
8663086632 heightSegments = 30;
8663186633
8663286634 if (faces_limit > 0) {
@@ -86721,7 +86723,7 @@ function createHypeBuffer(shape, faces_limit) {
8672186723 if ((shape.fTin === 0) && (shape.fTout === 0))
8672286724 return createTubeBuffer(shape, faces_limit);
8672386725
86724- let radiusSegments = Math.max(4, Math.round(360/cfg$1 .GradPerSegm)),
86726+ let radiusSegments = Math.max(4, Math.round(360/cfg.GradPerSegm)),
8672586727 heightSegments = 30,
8672686728 numfaces = radiusSegments * (heightSegments + 1) * ((shape.fRmin > 0) ? 4 : 2);
8672786729
@@ -87094,7 +87096,7 @@ function createComposite(shape, faces_limit) {
8709487096 return geom1;
8709587097 }
8709687098
87097- let bsp1 = new Geometry(geom1, matrix1, cfg$1 .CompressComp ? 0 : undefined);
87099+ let bsp1 = new Geometry(geom1, matrix1, cfg.CompressComp ? 0 : undefined);
8709887100
8709987101 const bsp2 = new Geometry(geom2, matrix2, bsp1.maxid);
8710087102
@@ -159177,9 +159179,19 @@ class RPadPainter extends RObjectPainter {
159177159179 this.createAttFill({ pattern: 1001, color: 0 });
159178159180
159179159181 if ((rect.width <= lmt) || (rect.height <= lmt)) {
159180- svg.style('display', 'none');
159181- console.warn(`Hide canvas while geometry too small w=${rect.width} h=${rect.height}`);
159182- rect.width = 200; rect.height = 100; // just to complete drawing
159182+ if (this.snapid === undefined) {
159183+ svg.style('display', 'none');
159184+ console.warn(`Hide canvas while geometry too small w=${rect.width} h=${rect.height}`);
159185+ }
159186+ if (this._pad_width && this._pad_height) {
159187+ // use last valid dimensions
159188+ rect.width = this._pad_width;
159189+ rect.height = this._pad_height;
159190+ } else {
159191+ // just to complete drawing.
159192+ rect.width = 800;
159193+ rect.height = 600;
159194+ }
159183159195 } else
159184159196 svg.style('display', null);
159185159197
@@ -159924,7 +159936,7 @@ class RPadPainter extends RObjectPainter {
159924159936
159925159937 const mainid = this.selectDom().attr('id');
159926159938
159927- if (!this.isBatchMode() && !this.use_openui && !this.brlayout && mainid && isStr(mainid) && !getHPainter()) {
159939+ if (!this.isBatchMode() && this.online_canvas && !this.use_openui && !this.brlayout && mainid && isStr(mainid) && !getHPainter()) {
159928159940 this.brlayout = new BrowserLayout(mainid, null, this);
159929159941 this.brlayout.create(mainid, true);
159930159942 this.setDom(this.brlayout.drawing_divid()); // need to create canvas
0 commit comments