Skip to content

Commit 5d19899

Browse files
committed
Last formating with .at(-1)
1 parent 927901b commit 5d19899

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

modules/geom/geobase.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1351,7 +1351,7 @@ function createXtruBuffer(shape, faces_limit) {
13511351
pnts.push(new THREE.Vector2(shape.fX[vert], shape.fY[vert]));
13521352

13531353
let faces = THREE.ShapeUtils.triangulateShape(pnts, []);
1354-
if (faces.length < pnts.length-2) {
1354+
if (faces.length < pnts.length - 2) {
13551355
geoWarn(`Problem with XTRU shape ${shape.fName} with ${pnts.length} vertices`);
13561356
faces = [];
13571357
} else

modules/gui/display.mjs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -809,7 +809,7 @@ class FlexibleDisplay extends MDIDisplay {
809809

810810
const main = d3_select(frame.parentNode), left = main.style('left'), top = main.style('top');
811811

812-
return { x: parseInt(left.slice(0, left.length-2)), y: parseInt(top.slice(0, top.length-2)),
812+
return { x: parseInt(left.slice(0, left.length - 2)), y: parseInt(top.slice(0, top.length - 2)),
813813
w: main.node().clientWidth, h: main.node().clientHeight };
814814
}
815815

@@ -995,7 +995,7 @@ class FlexibleDisplay extends MDIDisplay {
995995
const changeProp = (i, name, dd) => {
996996
if (i >= current.length) {
997997
const v = moving_div.style(name);
998-
current[i] = parseInt(v.slice(0, v.length-2));
998+
current[i] = parseInt(v.slice(0, v.length - 2));
999999
}
10001000
current[i] += dd;
10011001
moving_div.style(name, Math.max(0, current[i])+'px');
@@ -1531,8 +1531,8 @@ class BrowserLayout {
15311531
if ((hsepar === null) && first_time && !main.select('.jsroot_h_separator').empty()) {
15321532
// if separator set for the first time, check if status line present
15331533
hsepar = main.select('.jsroot_h_separator').style('bottom');
1534-
if (isStr(hsepar) && (hsepar.length > 2) && (hsepar.indexOf('px') === hsepar.length-2))
1535-
hsepar = hsepar.slice(0, hsepar.length-2);
1534+
if (isStr(hsepar) && (hsepar.length > 2) && (hsepar.indexOf('px') === hsepar.length - 2))
1535+
hsepar = hsepar.slice(0, hsepar.length - 2);
15361536
else
15371537
hsepar = null;
15381538
}
@@ -1736,8 +1736,8 @@ class BrowserLayout {
17361736

17371737
const drag_move = d3_drag().on('start', () => {
17381738
const sl = area.style('left'), st = area.style('top');
1739-
this._float_left = parseInt(sl.slice(0, sl.length-2));
1740-
this._float_top = parseInt(st.slice(0, st.length-2));
1739+
this._float_left = parseInt(sl.slice(0, sl.length - 2));
1740+
this._float_top = parseInt(st.slice(0, st.length - 2));
17411741
this._max_left = Math.max(0, main.node().clientWidth - area.node().offsetWidth - 1);
17421742
this._max_top = Math.max(0, main.node().clientHeight - area.node().offsetHeight - 1);
17431743
}).filter(evnt => {
@@ -1752,7 +1752,7 @@ class BrowserLayout {
17521752

17531753
drag_resize = d3_drag().on('start', () => {
17541754
const sw = area.style('width');
1755-
this._float_width = parseInt(sw.slice(0, sw.length-2));
1755+
this._float_width = parseInt(sw.slice(0, sw.length - 2));
17561756
this._float_height = area.node().clientHeight;
17571757
this._max_width = main.node().clientWidth - area.node().offsetLeft - 1;
17581758
this._max_height = main.node().clientHeight - area.node().offsetTop - 1;

modules/hist/TH2Painter.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ function drawTH2PolyLego(painter) {
8282
faces = null;
8383
}
8484

85-
if (faces && (faces.length > pnts.length-3)) break;
85+
if (faces && (faces.length > pnts.length - 3)) break;
8686
}
8787

8888
if (faces?.length && pnts) {

modules/io.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,7 @@ function createStreamerElement(name, typename, file) {
695695
return elem;
696696
}
697697

698-
const isptr = typename.at(-1) == '*';
698+
const isptr = typename.at(-1) === '*';
699699

700700
if (isptr)
701701
elem.fTypeName = typename = typename.slice(0, typename.length - 1);

modules/webwindow.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@ class WebWindowHandle {
564564
return this.href;
565565
let addr = this.href;
566566
if (relative_path.indexOf('../') === 0) {
567-
const ddd = addr.lastIndexOf('/', addr.length-2);
567+
const ddd = addr.lastIndexOf('/', addr.length - 2);
568568
addr = addr.slice(0, ddd) + relative_path.slice(2);
569569
} else
570570
addr += relative_path;

0 commit comments

Comments
 (0)