Skip to content

Commit 32ce65d

Browse files
committed
Use absolute files path in demos
1 parent fae90a9 commit 32ce65d

File tree

10 files changed

+12
-12
lines changed

10 files changed

+12
-12
lines changed

demo/adopt_colors.htm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import { adoptRootColors } from 'jsroot/colors';
1919

2020
// absolute file path can be used as well
21-
const filename = '../../files/transparency_test.root';
21+
const filename = 'https://root.cern/js/files/transparency_test.root';
2222
const file = await openFile(filename);
2323
const lst = await file.readObject('mycolors');
2424
adoptRootColors(lst);

demo/context_menu.htm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
</script>
1010
</head>
1111
<body>
12-
<div id="guiDiv" path="../../files/" files="ct.root;exclusion.root;fillrandom.root;glbox.root;graph.root;hsimple.root;legends.root;rf107.root;stacks.root;zdemo.root">
12+
<div id="guiDiv" path="https://root.cern/js/files/" files="ct.root;exclusion.root;fillrandom.root;glbox.root;graph.root;hsimple.root;legends.root;rf107.root;stacks.root;zdemo.root">
1313
loading ...
1414
</div>
1515
</body>
@@ -21,7 +21,7 @@
2121

2222
const hpainter = await buildGUI('guiDiv');
2323

24-
await hpainter.openRootFile('../../files/hsimple.root');
24+
await hpainter.openRootFile('https://root.cern/js/files/hsimple.root');
2525

2626
const histpainter = await hpainter.display('hpxpy;1', 'colz');
2727

demo/file_hierarchy.htm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
h.setDisplay('simple', 'myMainDiv');
3232

3333
// open file and display element
34-
await h.openRootFile('../../files/hsimple.root');
34+
await h.openRootFile('https://root.cern/js/files/hsimple.root');
3535

3636
await h.display('hpxpy;1', 'colz');
3737
</script>

demo/node/file_proxy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ class FileProxyMultiple extends FileProxyPromise {
118118

119119
} // class FileProxyMultiple
120120

121-
let filearg = null, fname = '../../../files/hsimple.root';
121+
let filearg = null, fname = './hsimple.root';
122122

123123
if (process.argv && process.argv[3] && typeof process.argv[3] == 'string')
124124
fname = process.argv[3];

demo/read_file.htm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</body>
1414
<script type='module'>
1515
import { openFile, draw } from 'jsroot';
16-
const file = await openFile('../../files/hsimple.root');
16+
const file = await openFile('https://root.cern/js/files/hsimple.root');
1717
const obj = await file.readObject('hpxpy;1');
1818
draw('drawing', obj, 'colz');
1919
</script>

demo/read_geometry_tracks.htm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
<script type='module'>
1717
import { httpRequest, openFile, draw } from 'jsroot';
1818

19-
const geom_file = '../../files/geom/evegeoshape.json.gz',
20-
tracks_file = '../../files/geom/eve_tracks.root';
19+
const geom_file = 'https://root.cern/js/files/geom/evegeoshape.json.gz',
20+
tracks_file = 'https://root.cern/js/files/geom/eve_tracks.root';
2121

2222
const obj = await httpRequest(geom_file, 'object');
2323
const geo_painter = await draw('drawing', obj);

demo/read_tree.htm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
}
5959
}
6060

61-
const file = await openFile('../../files/hsimple.root');
61+
const file = await openFile('https://root.cern/js/files/hsimple.root');
6262
const tree = await file.readObject('ntuple;1');
6363

6464
treeProcess(tree, new TExampleSelector());

demo/store_json.htm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
import { parse, openFile, draw, cleanup, drawingJSON } from 'jsroot';
2222

2323
// absolute file path can be used as well
24-
const file = await openFile('../../files/hsimple.root');
24+
const file = await openFile('https://root.cern/js/files/hsimple.root');
2525
const obj = await file.readObject('hpxpy;1');
2626
await draw('drawing', obj, 'colz');
2727

demo/testing.htm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<script type='module'>
1515
import { openFile, draw } from 'jsroot';
1616
import { testInteractivity } from 'jsroot/testing';
17-
const file = await openFile('../../files/hsimple.root');
17+
const file = await openFile('https://root.cern/js/files/hsimple.root');
1818
const obj = await file.readObject('hpxpy;1');
1919
await draw('drawing', obj, 'colz');
2020
testInteractivity({ dom: document.getElementById('drawing'), timeout: 1000 });

demo/zoom_handler.htm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<script type='module'>
1818
import { openFile, draw } from 'jsroot';
1919

20-
const file = await openFile('../../files/hsimple.root');
20+
const file = await openFile('https://root.cern/js/files/hsimple.root');
2121

2222
const obj1 = await file.readObject('hpx;1');
2323

0 commit comments

Comments
 (0)