-
Notifications
You must be signed in to change notification settings - Fork 79
/
index.htm
70 lines (58 loc) · 2.82 KB
/
index.htm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Read a ROOT file</title>
<link rel="shortcut icon" href="img/RootIcon.ico"/>
<script type="importmap">
{
"imports": {
"jsroot": "./modules/main.mjs"
}
}
</script>
</head>
<body>
<div id="simpleGUI" path="../files/" files="ct.root;exclusion.root;fillrandom.root;glbox.root;graph.root;hsimple.root;legends.root;rf107.root;stacks.root;zdemo.root">
loading modules ...
</div>
<script type="module">
import { buildGUI } from 'jsroot';
buildGUI('simpleGUI');
</script>
</body>
</html>
<!--
This is JSROOT main page, which aims to display content of ROOT files.
Several URL parameters could be specified when opening page:
file - name of the file(s), which will be automatically open with page loading
json - name of JSON file(s) with ROOT object, stored by TBufferJSON::ConvertToJSON method
item - object name in the file to display
items - object names in the file to display
opt - draw option for the item
opts - draw options for the items
layout - can be 'simple', 'flex' or gridNxM where N and M are integer values
nobrowser - only file item(s) will be displayed, browser will be disabled
inject - name of JavaScript(s), automatically injected at the beginning
mathjax - use MathJax for Latex output (automatically loaded for TMathText objects)
palette - id of default color palette, 51..123 - new ROOT6 palette (default 57)
style - TStyle object itemname or JSON file name
toolbar - configure position and orientation of pad toolbar, combine 'right','vert','off'
optdate - plot specified date on the canvas, 1 - current time, 2 - file creation date, 3 - file modification date
optfile - plot file name on the canvas, 1 - file name, 2 - full file URL, 3 - object item name
datex - X position of date
datey - Y position of date
opttitle - plot item name on the canvas
dark - enables dark mode
Example:
https://root.cern/js/latest/?file=../files/hsimple.root&layout=grid2x2&item=[hpx;1,hpxpy;1]&opts=[,colz]
Page can be used to open files from other web servers like:
https://root.cern/js/latest/?file=https://jsroot.gsi.de/files/hsimple.root
But one should be aware about Cross-Origin Request blocking.
Read https://developer.mozilla.org/en/http_access_control for more details.
To avoid problem at all, one can copy only index.htm on the web server where data files are located.
And specify full path to the use module like:
import { buildGUI } from 'https://root.cern/js/latest/modules/gui.mjs';
If necessary, complete JSROOT can be installed on the web server.
Project repository: https://github.com/root-project/jsroot.
-->