Skip to content

Commit

Permalink
Build and fix eslint warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
linev committed Sep 26, 2024
1 parent 3197366 commit 258f799
Show file tree
Hide file tree
Showing 11 changed files with 1,233 additions and 1,241 deletions.
2,439 changes: 1,221 additions & 1,218 deletions build/jsroot.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion modules/draw/TGraphPolarPainter.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,6 @@ class TGraphPolargramPainter extends ObjectPainter {
}).then(() => {
return this.startTextDrawingAsync(polar.fPolarLabelFont, fontsize);
}).then(() => {

lbls = (nmajor === 8) ? ['0', '#frac{#pi}{4}', '#frac{#pi}{2}', '#frac{3#pi}{4}', '#pi', '#frac{5#pi}{4}', '#frac{3#pi}{2}', '#frac{7#pi}{4}'] : ['0', '#frac{2#pi}{3}', '#frac{4#pi}{3}'];
const aligns = [12, 11, 21, 31, 32, 33, 23, 13];

Expand Down
1 change: 0 additions & 1 deletion modules/gpad/RAxisPainter.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,6 @@ class RAxisPainter extends RObjectPainter {
label_g.property('fix_offset', fix_offset);

return this.startTextDrawingAsync(this.labelsFont, 'font', label_g).then(() => {

for (let nmajor = 0; nmajor < lbl_pos.length; ++nmajor) {
const lbl = this.format(lbl_pos[nmajor], true);
if (lbl === null) continue;
Expand Down
2 changes: 1 addition & 1 deletion modules/gpad/RCanvasPainter.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,7 @@ function drawRFrameTitle(reason, drag) {
return this.finishTextDrawing();
}).then(() => {
addDragHandler(this, { x: fx, y: Math.round(fy-title_margin-title_height), width: title_width, height: title_height,
minwidth: 20, minheight: 20, no_change_x: true, redraw: d => this.redraw('drag', d) })
minwidth: 20, minheight: 20, no_change_x: true, redraw: d => this.redraw('drag', d) });
});
}

Expand Down
2 changes: 1 addition & 1 deletion modules/gpad/TAxisPainter.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1155,7 +1155,7 @@ class TAxisPainter extends ObjectPainter {
this.scaleTextDrawing(applied_scale, label_g[lcnt]);

return this.finishTextDrawing(label_g[lcnt], true);
})
});
}

return pr.then(() => {
Expand Down
2 changes: 0 additions & 2 deletions modules/hist/RPavePainter.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@ class RLegendPainter extends RPavePainter {

textFont.setSize(height/(nlines * 1.2));
return this.startTextDrawingAsync(textFont, 'font').then(() => {

let posy = 0;

if (legend.fTitle) {
Expand Down Expand Up @@ -417,7 +416,6 @@ class RHistStatsPainter extends RPavePainter {

textFont.setSize(height/(nlines * 1.2));
return this.startTextDrawingAsync(textFont, 'font', text_g).then(() => {

if (nlines === 1)
this.drawText({ width, height, text: lines[0], latex: 1, draw_g: text_g });
else {
Expand Down
5 changes: 1 addition & 4 deletions modules/hist/TPavePainter.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,6 @@ class TPavePainter extends ObjectPainter {
this.createAttText({ attr: pt, can_rotate: false });

return this.startTextDrawingAsync(this.textatt.font, height/(nlines * 1.2)).then(() => {

if (nlines === 1)
this.drawText(this.textatt.createArg({ width, height, text: lines[0], latex: 1, norotate: true }));
else {
Expand Down Expand Up @@ -498,7 +497,6 @@ class TPavePainter extends ObjectPainter {
const pr = (num_txt > num_custom) ? this.startTextDrawingAsync(this.textatt.font, 0.85*height/nlines, text_g, max_font_size) : Promise.resolve();

return pr.then(() => {

for (let nline = 0; nline < nlines; ++nline) {
const entry = arr[nline], texty = nline*stepy;

Expand Down Expand Up @@ -804,9 +802,8 @@ class TPavePainter extends ObjectPainter {
text_promises.push(this.startTextDrawingAsync(textatt.font, textatt.getSize(pp.getPadHeight()), arg.draw_g, max_font_size)
.then(() => this.drawText(arg))
.then(() => this.finishTextDrawing(arg.draw_g)));
} else {
} else
this.drawText(arg);
}
}
}

Expand Down
1 change: 0 additions & 1 deletion modules/hist2d/RH1Painter.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,6 @@ class RH1Painter extends RHistPainter {
}

return pr.then(() => {

// if there are too many points, exclude many vertical drawings at the same X position
// instead define min and max value and made min-max drawing
let use_minmax = ((right-left) > 3*width);
Expand Down
5 changes: 2 additions & 3 deletions modules/hist2d/RH2Painter.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -536,14 +536,13 @@ class RH2Painter extends RHistPainter {
profile2d = false;

return this.startTextDrawingAsync(textFont, 'font', text_g).then(() => {

for (let i = handle.i1; i < handle.i2; i += di) {
for (let j = handle.j1; j < handle.j2; j += dj) {
let binz = histo.getBinContent(i+1, j+1);
if ((binz === 0) && !this._show_empty_bins) continue;

let binw = handle.grx[i+di] - handle.grx[i],
binh = handle.gry[j] - handle.gry[j+dj];
const binw = handle.grx[i+di] - handle.grx[i],
binh = handle.gry[j] - handle.gry[j+dj];

if (profile2d)
binz = histo.getBinEntries(i+1, j+1);
Expand Down
14 changes: 7 additions & 7 deletions modules/hist2d/TH1Painter.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ class TH1Painter extends THistPainter {
xaxis = histo.fXaxis,
show_text = this.options.Text;
let text_col, text_angle, text_size,
side = (this.options.BarStyle > 10) ? this.options.BarStyle % 10 : 0 , pr = Promise.resolve();
side = (this.options.BarStyle > 10) ? this.options.BarStyle % 10 : 0, pr = Promise.resolve();

if (side > 4) side = 4;
const gry2 = this.getBarBaseline(funcs, height);
Expand All @@ -425,18 +425,18 @@ class TH1Painter extends THistPainter {
let bars = '', barsl = '', barsr = '';

for (let i = left; i < right; ++i) {
let x1 = xaxis.GetBinLowEdge(i + 1),
x2 = xaxis.GetBinLowEdge(i + 2);
const x1 = xaxis.GetBinLowEdge(i + 1),
x2 = xaxis.GetBinLowEdge(i + 2);

if (funcs.logx && (x2 <= 0)) continue;

let grx1 = Math.round(funcs.grx(x1)),
grx2 = Math.round(funcs.grx(x2));
grx2 = Math.round(funcs.grx(x2)),
w = grx2 - grx1;
const y = histo.getBinContent(i+1);

let y = histo.getBinContent(i+1);
if (funcs.logy && (y < funcs.scale_ymin)) continue;
let gry1 = Math.round(funcs.gry(y)),
w = grx2 - grx1;
const gry1 = Math.round(funcs.gry(y));

grx1 += Math.round(histo.fBarOffset/1000*w);
w = Math.round(histo.fBarWidth/1000*w);
Expand Down
2 changes: 0 additions & 2 deletions modules/hist2d/TH2Painter.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1702,7 +1702,6 @@ class TH2Painter extends THistPainter {
text_size = ((histo.fMarkerSize !== 1) && rotate) ? Math.round(0.02*h*histo.fMarkerSize) : 12;

pr = this.startTextDrawingAsync(42, text_size, text_g, text_size).then(() => {

for (i = 0; i < textbins.length; ++i) {
const textbin = textbins[i];

Expand Down Expand Up @@ -2659,7 +2658,6 @@ class TH2Painter extends THistPainter {
const nbins = Math.min(this.nbinsx, this.nbinsy);

return this.startTextDrawingAsync(42, text_size, this.draw_g).then(() => {

const pnts = [];

for (let n = 0; n < nbins; n++) {
Expand Down

0 comments on commit 258f799

Please sign in to comment.