-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add the html file for jsroot.
- Loading branch information
Showing
1 changed file
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>Read a ROOT file</title> | ||
<link rel="shortcut icon" href="img/RootIcon.ico"/> | ||
</head> | ||
<body> | ||
<div id="simpleGUI"> | ||
loading scripts ... | ||
</div> | ||
<script type="module"> | ||
//import { buildGUI } from './modules/gui.mjs'; | ||
import { buildGUI } from 'https://root.cern/js/latest/modules/gui.mjs'; | ||
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' | ||
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. | ||
--> |