Skip to content

Commit 98ca5f9

Browse files
committed
Format code in examples
1 parent 68f1ec5 commit 98ca5f9

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

demo/multigraph.htm

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,35 +22,35 @@
2222
function updateGUI() {
2323
// this is just generation of graph
2424
const npoints = 20;
25-
let xpts = [], ypts = [];
26-
for (let i=0; i < npoints; i++) {
27-
if(cnt % 2 === 1) {
25+
const xpts = [], ypts = [];
26+
for (let i = 0; i < npoints; i++) {
27+
if (cnt % 2 === 1) {
2828
xpts.push(i);
2929
ypts.push(5*i);
3030
} else {
3131
xpts.push(i);
3232
ypts.push(i);
3333
}
3434
}
35-
let graph1 = createTGraph(npoints, xpts, ypts);
35+
const graph1 = createTGraph(npoints, xpts, ypts);
3636
graph1.fLineColor = 2;
3737
graph1.fMarkerSize = 2;
3838
xpts = [];
3939
ypts = [];
4040
for (let i = 0; i < npoints; i++) {
41-
if(cnt%2 === 1) {
41+
if (cnt%2 === 1) {
4242
xpts.push(i);
4343
ypts.push(i*i);
4444
} else {
4545
xpts.push(i);
4646
ypts.push(Math.sqrt(i));
4747
}
4848
}
49-
let graph2 = createTGraph(npoints, xpts, ypts);
49+
const graph2 = createTGraph(npoints, xpts, ypts);
5050
graph2.fLineColor = 3;
5151
graph2.fMarkerSize = 2;
5252

53-
let mgraph = createTMultiGraph(graph1, graph2);
53+
const mgraph = createTMultiGraph(graph1, graph2);
5454
mgraph.fTitle = 'Drawing ' + cnt++;
5555

5656
// set fixed Y-range if required

demo/node/buffer_test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ import { RBufferReader } from 'jsroot/rntuple';
5151
// set the 32 bit length of the string
5252
view.setUint32(0,text.length,true);
5353
//set each char's ASCII code
54-
for(let i = 0; i < text.length; i++){
54+
for (let i = 0; i < text.length; i++)
5555
view.setUint8(4+i,text.charCodeAt(i));
56-
}
56+
5757
const reader = new RBufferReader(buffer);
5858
const result = reader.readString();
5959

0 commit comments

Comments
 (0)