@@ -12,7 +12,7 @@ const version_id = 'dev',
12
12
13
13
/** @summary version date
14
14
* @desc Release date in format day/month/year like '14/04/2022' */
15
- version_date = '27 /01/2025',
15
+ version_date = '30 /01/2025',
16
16
17
17
/** @summary version id and date
18
18
* @desc Produced by concatenation of {@link version_id} and {@link version_date}
@@ -61563,7 +61563,8 @@ class JSRootMenu {
61563
61563
}
61564
61564
61565
61565
this.add('endcolumn:');
61566
- if (!this.native()) break;
61566
+ if (!this.native())
61567
+ break;
61567
61568
}
61568
61569
61569
61570
this.endsub();
@@ -61576,7 +61577,8 @@ class JSRootMenu {
61576
61577
61577
61578
let values = [], miss_current = false;
61578
61579
if (isObject(step)) {
61579
- values = step; step = 1;
61580
+ values = step;
61581
+ step = 1;
61580
61582
} else {
61581
61583
for (let sz = min; sz <= max; sz += step)
61582
61584
values.push(sz);
@@ -61616,7 +61618,6 @@ class JSRootMenu {
61616
61618
this.sub('Palette', () => this.input('Enter palette code [1..113]', curr, 'int', 1, 113).then(set_func));
61617
61619
61618
61620
this.add('column:');
61619
-
61620
61621
add(57, 'Bird', 'Default color palette', (curr > 113));
61621
61622
add(55, 'Rainbow');
61622
61623
add(51, 'Deep Sea');
@@ -61630,14 +61631,12 @@ class JSRootMenu {
61630
61631
add(59, '', 'Green Red Violet');
61631
61632
add(60, '', 'Blue Red Yellow');
61632
61633
add(61, 'Ocean');
61633
-
61634
61634
this.add('endcolumn:');
61635
61635
61636
61636
if (!this.native())
61637
61637
return this.endsub();
61638
61638
61639
61639
this.add('column:');
61640
-
61641
61640
add(62, '', 'Color Printable On Grey');
61642
61641
add(63, 'Alpine');
61643
61642
add(64, 'Aquamarine');
@@ -61651,10 +61650,9 @@ class JSRootMenu {
61651
61650
add(72, 'Brown Cyan');
61652
61651
add(73, 'CMYK');
61653
61652
add(74, 'Candy');
61654
-
61655
61653
this.add('endcolumn:');
61656
- this.add('column:');
61657
61654
61655
+ this.add('column:');
61658
61656
add(75, 'Cherry');
61659
61657
add(76, 'Coffee');
61660
61658
add(77, '', 'Dark Rain Bow');
@@ -61668,10 +61666,9 @@ class JSRootMenu {
61668
61666
add(85, 'Island');
61669
61667
add(86, 'Lake');
61670
61668
add(87, '', 'Light Temperature');
61671
-
61672
61669
this.add('endcolumn:');
61673
- this.add('column:');
61674
61670
61671
+ this.add('column:');
61675
61672
add(88, '', 'Light Terrain');
61676
61673
add(89, 'Mint');
61677
61674
add(90, 'Neon');
@@ -61685,10 +61682,9 @@ class JSRootMenu {
61685
61682
add(98, '', 'Sandy Terrain');
61686
61683
add(99, 'Sienna');
61687
61684
add(100, 'Solar');
61688
-
61689
61685
this.add('endcolumn:');
61690
- this.add('column:');
61691
61686
61687
+ this.add('column:');
61692
61688
add(101, '', 'South West');
61693
61689
add(102, '', 'Starry Night');
61694
61690
add(103, '', 'Sunset');
@@ -61702,7 +61698,6 @@ class JSRootMenu {
61702
61698
add(111, '', 'Gist Earth');
61703
61699
add(112, 'Viridis');
61704
61700
add(113, 'Cividis');
61705
-
61706
61701
this.add('endcolumn:');
61707
61702
61708
61703
this.endsub();
@@ -61812,7 +61807,8 @@ class JSRootMenu {
61812
61807
supported.push(3144, 3244, 3344, 3305, 3315, 3325, 3490, 3481, 3472);
61813
61808
61814
61809
for (let n = 0; n < supported.length; ++n) {
61815
- if (n % 7 === 0) this.add('column:');
61810
+ if (n % 7 === 0)
61811
+ this.add('column:');
61816
61812
61817
61813
const selected = (value === supported[n]);
61818
61814
@@ -61826,7 +61822,8 @@ class JSRootMenu {
61826
61822
this.add(svgelement.node().outerHTML, supported[n], arg => set_func(parseInt(arg)), `Pattern : ${supported[n]}` + (selected ? ' Active' : ''));
61827
61823
} else
61828
61824
this.addchk(selected, supported[n].toString(), supported[n], arg => set_func(parseInt(arg)));
61829
- if (n % 7 === 6) this.add('endcolumn:');
61825
+ if (n % 7 === 6)
61826
+ this.add('endcolumn:');
61830
61827
}
61831
61828
this.endsub();
61832
61829
}
@@ -62344,7 +62341,8 @@ class JSRootMenu {
62344
62341
}, 'Store settings and gStyle in browser local storage');
62345
62342
this.add('Delete settings', () => { saveSettings(-1); saveStyle(-1); }, 'Delete settings and gStyle from browser local storage');
62346
62343
62347
- if (!alone) this.endsub();
62344
+ if (!alone)
62345
+ this.endsub();
62348
62346
}
62349
62347
62350
62348
/** @summary Run modal dialog
@@ -62566,30 +62564,33 @@ class StandaloneMenu extends JSRootMenu {
62566
62564
_buildContextmenu(menu, left, top, loc) {
62567
62565
const doc = getDocument(),
62568
62566
outer = doc.createElement('div'),
62567
+ clname = 'jsroot_ctxt_container',
62568
+ clfocus = 'jsroot_ctxt_focus',
62569
+ clcolumn = 'jsroot_ctxt_column',
62569
62570
container_style =
62570
62571
'position: absolute; top: 0; user-select: none; z-index: 100000; background-color: rgb(250, 250, 250); margin: 0; padding: 0px; width: auto;'+
62571
62572
'min-width: 100px; box-shadow: 0px 0px 10px rgb(0, 0, 0, 0.2); border: 3px solid rgb(215, 215, 215); font-family: Arial, helvetica, sans-serif, serif;'+
62572
62573
'font-size: 13px; color: rgb(0, 0, 0, 0.8); line-height: 15px;';
62573
62574
62574
62575
// if loc !== doc.body then its a submenu, so it needs to have position: relative;
62575
62576
if (loc === doc.body) {
62576
- // delete all elements with className jsroot_ctxt_container
62577
- const deleteElems = doc.getElementsByClassName('jsroot_ctxt_container' );
62578
- while ( deleteElems.length > 0 )
62579
- deleteElems[0 ].parentNode.removeChild(deleteElems[0 ]);
62577
+ // delete all elements with menu className
62578
+ const deleteElems = doc.getElementsByClassName(clname );
62579
+ for (let k = deleteElems.length - 1; k >= 0; --k )
62580
+ deleteElems[k ].parentNode.removeChild(deleteElems[k ]);
62580
62581
62581
- outer.className = 'jsroot_ctxt_container' ;
62582
+ outer.className = clname ;
62582
62583
outer.style = container_style;
62583
62584
outer.style.position = 'fixed';
62584
62585
outer.style.left = left + 'px';
62585
62586
outer.style.top = top + 'px';
62586
62587
} else if ((left < 0) && (top === left)) {
62587
62588
// column
62588
- outer.className = 'jsroot_ctxt_column' ;
62589
+ outer.className = clcolumn ;
62589
62590
outer.style.float = 'left';
62590
62591
outer.style.width = (100/-left).toFixed(1) + '%';
62591
62592
} else {
62592
- outer.className = 'jsroot_ctxt_container' ;
62593
+ outer.className = clname ;
62593
62594
outer.style = container_style;
62594
62595
outer.style.left = -loc.offsetLeft + loc.offsetWidth + 'px';
62595
62596
}
@@ -62708,12 +62709,12 @@ class StandaloneMenu extends JSRootMenu {
62708
62709
62709
62710
function changeFocus(item, on) {
62710
62711
if (on) {
62711
- item.classList.add('jsroot_ctxt_focus' );
62712
+ item.classList.add(clfocus );
62712
62713
item.style['background-color'] = 'rgb(220, 220, 220)';
62713
- } else if (item.classList.contains('jsroot_ctxt_focus' )) {
62714
+ } else if (item.classList.contains(clfocus )) {
62714
62715
item.style['background-color'] = null;
62715
- item.classList.remove('jsroot_ctxt_focus' );
62716
- item.querySelector('.jsroot_ctxt_container' )?.remove();
62716
+ item.classList.remove(clfocus );
62717
+ item.querySelector(`.${clname}` )?.remove();
62717
62718
}
62718
62719
}
62719
62720
@@ -62728,7 +62729,7 @@ class StandaloneMenu extends JSRootMenu {
62728
62729
extraText.addEventListener('click', evnt => {
62729
62730
evnt.preventDefault();
62730
62731
evnt.stopPropagation();
62731
- const was_active = item.parentNode.querySelector('.jsroot_ctxt_focus' );
62732
+ const was_active = item.parentNode.querySelector(`.${clfocus}` );
62732
62733
62733
62734
if (was_active)
62734
62735
changeFocus(was_active, false);
@@ -62787,7 +62788,7 @@ class StandaloneMenu extends JSRootMenu {
62787
62788
// Does contextmenu overflow window height?
62788
62789
outer.style.top = (docHeight - outer.offsetHeight) + 'px';
62789
62790
}
62790
- } else if (outer.className !== 'jsroot_ctxt_column' ) {
62791
+ } else if (outer.className !== clcolumn ) {
62791
62792
// if its sub-contextmenu
62792
62793
const dimensionsLoc = loc.getBoundingClientRect(), dimensionsOuter = outer.getBoundingClientRect();
62793
62794
@@ -62821,15 +62822,15 @@ class StandaloneMenu extends JSRootMenu {
62821
62822
async show(event) {
62822
62823
this.remove();
62823
62824
62824
- if (!event && this.show_evnt) event = this.show_evnt;
62825
+ if (!event && this.show_evnt)
62826
+ event = this.show_evnt;
62825
62827
62826
62828
const doc = getDocument(),
62827
62829
woffset = typeof window === 'undefined' ? { x: 0, y: 0 } : { x: window.scrollX, y: window.scrollY };
62828
62830
62829
62831
doc.body.addEventListener('click', this.remove_handler);
62830
62832
62831
- const oldmenu = doc.getElementById(this.menuname);
62832
- if (oldmenu) oldmenu.remove();
62833
+ doc.getElementById(this.menuname)?.remove();
62833
62834
62834
62835
this.element = this._buildContextmenu(this.code, (event?.clientX || 0) + woffset.x, (event?.clientY || 0) + woffset.y, doc.body);
62835
62836
@@ -62840,9 +62841,11 @@ class StandaloneMenu extends JSRootMenu {
62840
62841
62841
62842
/** @summary Run modal elements with standalone code */
62842
62843
createModal(title, main_content, args) {
62843
- if (!args) args = {};
62844
+ if (!args)
62845
+ args = {};
62844
62846
62845
- if (!args.Ok) args.Ok = 'Ok';
62847
+ if (!args.Ok)
62848
+ args.Ok = 'Ok';
62846
62849
62847
62850
const modal = { args }, dlg_id = (this?.menuname ?? sDfltName) + sDfltDlg;
62848
62851
select(`#${dlg_id}`).remove();
@@ -62909,8 +62912,10 @@ class StandaloneMenu extends JSRootMenu {
62909
62912
});
62910
62913
62911
62914
let f = modal.element.select('.jsroot_dialog_content').select('input');
62912
- if (f.empty()) f = modal.element.select('.jsroot_dialog_footer').select('button');
62913
- if (!f.empty()) f.node().focus();
62915
+ if (f.empty())
62916
+ f = modal.element.select('.jsroot_dialog_footer').select('button');
62917
+ if (!f.empty())
62918
+ f.node().focus();
62914
62919
return modal;
62915
62920
}
62916
62921
@@ -101856,9 +101861,11 @@ class TFile {
101856
101861
obj_name = obj_name.slice(0, pos);
101857
101862
}
101858
101863
101859
- if (typeof cycle !== 'number') cycle = -1;
101864
+ if (typeof cycle !== 'number')
101865
+ cycle = -1;
101860
101866
// remove leading slashes
101861
- while (obj_name.length && (obj_name[0] === '/')) obj_name = obj_name.slice(1);
101867
+ while (obj_name.length && (obj_name[0] === '/'))
101868
+ obj_name = obj_name.slice(1);
101862
101869
101863
101870
// one uses Promises while in some cases we need to
101864
101871
// read sub-directory to get list of keys
@@ -101923,8 +101930,8 @@ class TFile {
101923
101930
try {
101924
101931
buf.classStreamer(lst, clTList);
101925
101932
} catch (err) {
101926
- console.error('Fail extract streamer infos', err);
101927
- return;
101933
+ console.error('Fail extract streamer infos', err);
101934
+ return;
101928
101935
}
101929
101936
101930
101937
lst._typename = clTStreamerInfoList;
@@ -101939,7 +101946,8 @@ class TFile {
101939
101946
if (!si.fElements) continue;
101940
101947
for (let l = 0; l < si.fElements.arr.length; ++l) {
101941
101948
const elem = si.fElements.arr[l];
101942
- if (!elem.fTypeName || !elem.fType) continue;
101949
+ if (!elem.fTypeName || !elem.fType)
101950
+ continue;
101943
101951
101944
101952
let typ = elem.fType, typname = elem.fTypeName;
101945
101953
@@ -102025,7 +102033,8 @@ class TFile {
102025
102033
nbytes += 4; // fDatimeM.Sizeof();
102026
102034
nbytes += 18; // fUUID.Sizeof();
102027
102035
// assume that the file may be above 2 Gbytes if file version is > 4
102028
- if (this.fVersion >= 40000) nbytes += 12;
102036
+ if (this.fVersion >= 40000)
102037
+ nbytes += 12;
102029
102038
102030
102039
// this part typically read from the header, no need to optimize
102031
102040
return this.readBuffer([this.fBEGIN, Math.max(300, nbytes)]);
@@ -102048,7 +102057,7 @@ class TFile {
102048
102057
}).then(blobs => {
102049
102058
const buf4 = new TBuffer(blobs[0], 0, this);
102050
102059
102051
- buf4.readTKey(); //
102060
+ buf4.readTKey();
102052
102061
const nkeys = buf4.ntoi4();
102053
102062
for (let i = 0; i < nkeys; ++i)
102054
102063
this.fKeys.push(buf4.readTKey());
@@ -102082,15 +102091,17 @@ class TFile {
102082
102091
* @param {number} [checksum] - streamer info checksum, have to match when specified
102083
102092
* @private */
102084
102093
findStreamerInfo(clname, clversion, checksum) {
102085
- if (!this.fStreamerInfos) return null;
102094
+ if (!this.fStreamerInfos)
102095
+ return null;
102086
102096
102087
102097
const arr = this.fStreamerInfos.arr, len = arr.length;
102088
102098
102089
102099
if (checksum !== undefined) {
102090
102100
let cache = this.fStreamerInfos.cache;
102091
102101
if (!cache) cache = this.fStreamerInfos.cache = {};
102092
102102
let si = cache[checksum];
102093
- if (si !== undefined) return si;
102103
+ if (si !== undefined)
102104
+ return si;
102094
102105
102095
102106
for (let i = 0; i < len; ++i) {
102096
102107
si = arr[i];
@@ -102103,7 +102114,8 @@ class TFile {
102103
102114
} else {
102104
102115
for (let i = 0; i < len; ++i) {
102105
102116
const si = arr[i];
102106
- if ((si.fName === clname) && ((si.fClassVersion === clversion) || (clversion === undefined))) return si;
102117
+ if ((si.fName === clname) && ((si.fClassVersion === clversion) || (clversion === undefined)))
102118
+ return si;
102107
102119
}
102108
102120
}
102109
102121
@@ -102122,7 +102134,8 @@ class TFile {
102122
102134
if (ver) {
102123
102135
fullname += (ver.checksum ? `$chksum${ver.checksum}` : `$ver${ver.val}`);
102124
102136
streamer = this.fStreamers[fullname];
102125
- if (streamer !== undefined) return streamer;
102137
+ if (streamer !== undefined)
102138
+ return streamer;
102126
102139
}
102127
102140
102128
102141
const custom = CustomStreamers[clname];
@@ -102175,9 +102188,11 @@ class TFile {
102175
102188
/** @summary Here we produce list of members, resolving all base classes
102176
102189
* @private */
102177
102190
getSplittedStreamer(streamer, tgt) {
102178
- if (!streamer) return tgt;
102191
+ if (!streamer)
102192
+ return tgt;
102179
102193
102180
- if (!tgt) tgt = [];
102194
+ if (!tgt)
102195
+ tgt = [];
102181
102196
102182
102197
for (let n = 0; n < streamer.length; ++n) {
102183
102198
const elem = streamer[n];
@@ -102193,7 +102208,8 @@ class TFile {
102193
102208
buf.ntoi2(); // read version, why it here??
102194
102209
obj.fUniqueID = buf.ntou4();
102195
102210
obj.fBits = buf.ntou4();
102196
- if (obj.fBits & kIsReferenced) buf.ntou2(); // skip pid
102211
+ if (obj.fBits & kIsReferenced)
102212
+ buf.ntou2(); // skip pid
102197
102213
}
102198
102214
});
102199
102215
continue;
0 commit comments