Skip to content

Commit 73cc0ba

Browse files
committed
Merge changes from 'dev' before 5.3.0 release
2 parents d6d95ae + 458b0b0 commit 73cc0ba

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+27137
-24590
lines changed

bower.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
],
88
"repository": {
99
"type": "git",
10-
"url": "git://github.com/root-project/jsrootr.git"
10+
"url": "git://github.com/root-project/jsroot.git"
1111
},
1212
"description": "JavaScript ROOT library",
1313
"main": "scripts/JSRootCore.js",
@@ -18,12 +18,12 @@
1818
],
1919
"dependencies": {
2020
"d3": "~4.4.4",
21-
"jquery": "3.1.1",
21+
"jquery": "2.2.3",
2222
"jquery-ui": "1.12.1",
2323
"jquery-mousewheel" : "3.1.13",
2424
"jqueryui-touch-punch" : "*",
2525
"MathJax" : "2.7.0",
26-
"threejs": "r85",
26+
"threejs": "r86",
2727
"dat.gui": "*"
2828
},
2929
"keywords": [

changes.md

Lines changed: 42 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,46 @@
11
# JSROOT changelog
22

3-
## Changes in 5.2.4
4-
1. Fix - support pow(x,n) function in formula
5-
2. Fix - use pad.fFillColor for frame when fFrameFillColor==0
6-
3. Fix - correctly identify horizontal TGaxis with reverse scale
7-
4. Fix - correctly handle negative line width in exclusion
8-
5. Fix - tooltips handling for TF1
9-
10-
11-
## Changes in 5.2.3
12-
1. Fix - potential mix-up in marker attributes handling
13-
2. Fix - unzomming of log scale https://root-forum.cern.ch/t/25889
14-
3. Fix - ignore not-supported options in TMultiGraph https://root-forum.cern.ch/t/25888
15-
4. Fix - correctly use fGridColor from TStyle
16-
5. Fix - prevent error when TPaveText includes TLine or TBox in list of lines
17-
6. Fix - bin errors calculations in TProfile
18-
19-
20-
## Changes in 5.2.2
21-
1. Fix several problems, discovered with "use strict" directive
22-
23-
24-
## Changes in 5.2.1
25-
1. Fix - correctly handle new TF1 parameter coding convention (#132)
26-
2. Fix - Check if pad name can be used as element id (#133)
27-
3. Fix - adjust title position for vertical axis with fTitleOffset==0
3+
## Changes in 5.3.0
4+
1. New supported classes:
5+
- TGraphPolar
6+
- TGraphTime
7+
- TSpline3
8+
- TSpline5
9+
- TPolyLine3D
10+
- TPolyMarker
11+
- TEfficiency
12+
- TH1K
13+
2. New supported options:
14+
"PFC" - auto fill color (histograms and graphs)
15+
"PLC" - auto line color
16+
"PMC" - auto marker color
17+
"A" - fully disables axes drawing for histograms painters
18+
"TEXT" - for TH2Poly
19+
"SAMES" - draw stat box for superimposed histograms
20+
"NOCOL" - ignore stored in the TCanvas colors list
21+
"NOPAL" - ignore stored in the TCanvas color palette
22+
3. Improvements in existing painters:
23+
- use color palette stored in the TCanvas
24+
- draw stats box when really required
25+
- let resize frames and paves in all eight directions
26+
- support lines, boxes and arbitrary text positions in TPaveText
27+
- automatic title positioning of vertical axis when fTitleOffset==0
28+
- when pad.fTickx/y==2 draw axes labels on opposite side
29+
- editing of TGraph objects - moving of the graph bins
30+
- draw X/Y/Z axis titles in lego plots
31+
- use canvas Theta/Phi angles to set initial camera position in 3D plots
32+
4. New TLatex processor supports most ROOT features, still MathJax can be used
33+
5. New X/Y projections display for TH2 histograms (aka TH2::SetShowProjectionX/Y)
34+
6. New in geometry viewer:
35+
- provide shape parameters in TGeo tooltips
36+
- let inspect selected TGeoNode
37+
- provide text info when geometry drawing takes too long
38+
7. Change in JSROOT.draw functionality. Now valid painter instance can be only
39+
obtained via call-back - forth argument of JSROOT.draw() function.
40+
8. Use latest three.js r86 with improved Projector and CanvasRenderer
41+
Still use own SVGRenderer which supported direct SVG text dump
42+
9. Introduce openui5 components for webgui functionality
43+
10. In all sources specify "use strict" directive
2844

2945

3046
## Changes in 5.2.0
@@ -720,7 +736,7 @@
720736
in ROOT repository
721737

722738
### March 2014
723-
1. Introduce JSROOT.TBuffer class, which plays similar role
739+
1. Introduce TBuffer class, which plays similar role
724740
as TBuffer in native ROOT I/O. Simplifies I/O logic,
725741
reduce duplication of code in many places, fix errors.
726742
Main advantage - one could try to keep code synchronous with C++.

demo/amore.js

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,6 @@
1-
// custom draw function (old code, now not used).
2-
Amore_Histo_Draw = function(divid, obj, opt) {
3-
4-
// normal draw function
5-
var painter = JSROOT.draw(divid, obj.fVal, opt);
6-
7-
// redefine update function while it expects histogram as argument
8-
// only required if object need to be monitored from http server
9-
painter.OldUpdate = painter.UpdateObject;
10-
painter.UpdateObject = function(amore) {
11-
return this.OldUpdate(amore.fVal);
12-
}
13-
14-
return painter;
15-
}
16-
171
// special handling for the amore::core::String_t which is redifinition of TString
182
JSROOT.addUserStreamer("amore::core::String_t", "TString");
193

204
// register class and identify, that 'fVal' field should be used for drawing
215
// one could specify explicit draw function, but it is not required in such simple case
22-
JSROOT.addDrawFunc({ name: "amore::core::MonitorObjectHisto<TH1F>", icon: "img_histo1d", draw_field: "fVal" /* , func: "Amore_Histo_Draw" */ });
6+
JSROOT.addDrawFunc({ name: "amore::core::MonitorObjectHisto<TH1F>", icon: "img_histo1d", draw_field: "fVal" });

demo/examples.js

Lines changed: 49 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ examples_main = {
77
{ opt: "L", title: "draw histogram as line" },
88
{ name: "LF2", opt:"LF2,fill_blue", title: "draw histogram as line with filled area" },
99
{ name: "B", opt:"B,fill_red", title: "draw histogram as bar chart" },
10+
{ opt: "A", title: "disables axes drawing" },
1011
{ opt: "E" },
1112
{ opt: "E0", title: "draw errors, also for empty bins" },
1213
{ opt: "E1" },
@@ -25,12 +26,13 @@ examples_main = {
2526
{ opt: "col" },
2627
{ opt: "colpal77", title: "example how color palette 77 can be used for drawing" },
2728
{ opt: "colz", title: "color draw with palette" },
29+
{ opt: "acol", title: "disable axes drawing with col option" },
2830
{ opt: "arr", title: "ARR draw option" },
29-
{ opt: "cont", title: "Contor plot" },
30-
{ opt: "cont1", title: "Contor plot with different line colors" },
31-
{ opt: "cont2", title: "Contor plot with different line styles" },
32-
{ opt: "cont3", title: "Contor plot with just lines" },
33-
{ opt: "cont4", title: "Contor plot with background color" },
31+
{ opt: "cont", title: "Contour plot" },
32+
{ opt: "cont1", title: "Contour plot with different line colors" },
33+
{ opt: "cont2", title: "Contour plot with different line styles" },
34+
{ opt: "cont3", title: "Contour plot with just lines" },
35+
{ opt: "cont4", title: "Contour plot with background color" },
3436
{ opt: "surf", title: "3D plot with surf option" },
3537
{ opt: "surf1", title: "3D SURF plot with colors levels" },
3638
{ opt: "surf2", title: "3D colored SURF without lines" },
@@ -56,6 +58,7 @@ examples_main = {
5658
{ opt: "col0z", title: "suppress empty bins with 0 option" },
5759
{ name: "europe", item: "europe;1", opt: "", title: "Europe map (relatively old)" },
5860
{ name: "usa", item: "usa;1", opt: "l,col,pal50", title: "USA map" },
61+
{ name: "fibonacci", file: "tutorials_hist.root", item: 'Fibonacci', title: "Macro outputs from $ROOTSYS/tutorials/hist/Fibonacci.C" }
5962
],
6063
TH3 : [
6164
{ opt: "", file: "histpainter6.root", item: "draw_th3_scat;1" },
@@ -91,7 +94,8 @@ examples_main = {
9194
THStack : [
9295
{ opt: "", file: "histpainter6.root", item: "draw_hstack;1", title: "several examples from THistPainter docu" },
9396
{ name: "nostackb", item: "draw_nostackb;1", title: "example of bar chart with stacked histograms" },
94-
{ name: "err", item: "draw_stacke;1", title: "error draw options for stacked histograms" }
97+
{ name: "err", item: "draw_stacke;1", title: "error draw options for stacked histograms" },
98+
{ name: "lego", file: "tutorials_hist.root", item: 'multicolor', title: "Several histograms with different colors, tutorials/hist/multicolor.C" }
9599
],
96100
TF1 : [
97101
{ name: "hist+func", opt: "", url: "?nobrowser&file=$$$fillrandom.root&item=h1f;1+sqroot;1" },
@@ -100,11 +104,16 @@ examples_main = {
100104
{ name: "ff2", file: "ff2.root", item: "c1Dia;1" },
101105
{ name: "ff3", file: "ff3.root", item: "c1Dia;1" }
102106
],
107+
TF2 : [
108+
{ name: "tf2", json: "tf2.json.gz", opt: "nosave", title: "Example of TF2 drawing" },
109+
{ name: "3d", file: "tutorials_graphs.root", item: "annotation3d", title: "Output of tutorials/graphs/annotation3d.C" },
110+
{ name: "pnt", file: "tutorials_graphs.root", item: "graph2derrorsfit", title: "Combination of TF2 and TGraph2DErrors, output of tutorials/graphs/graph2derrorsfit.C" },
111+
],
103112
TCanvas : [
104113
{ name:"roofit", file: "rf107.root", item: "rf107_plotstyles;1" },
105114
{ name:"subpad", url: "?nobrowser&file=$$$rf107.root&item=rf107_plotstyles;1/[0]", title: "Draw only selected sub-pad from list of TCanvas list of primitives" },
106115
{ name:"zdemo", file: "zdemo.root", item: "zdemo;1" },
107-
{ name:"legend", asurl: true, file: "legends.root", item: "legends;1", mathjax: true, title: "TCanvas with TLegend, use MathJax.js" },
116+
{ name:"legend", asurl: true, file: "legends.root", item: "legends;1", latex: "mathjax", title: "TCanvas with TLegend, use MathJax.js" },
108117
{ name:"time", file: "ct.root", item: "ct;1" },
109118
{ name:"2d+3d", file: "mix2d3d.root", item: "Canvas;1", title: "Mixture of 2D and 3D drawings on the same canvas (work properly in Firefox and Chrome)" }
110119
],
@@ -125,15 +134,18 @@ examples_main = {
125134
{ name: "proj", url: "?nobrowser&layout=h12_21&files=[https://root.cern/files/alice_ESDgeometry.root,$$$geom/eve_tracks.root]&items=[[[0]/Gentle,[1]/tracks],[0]/Gentle,[0]/Gentle]&opts=[main;black,projz;black,projx;black]", title: "Simple ALICE geometry and two projections" }
126135
],
127136
TGraph : [
128-
{ opt:"", file: "graph.root", item: "Graph;1" },
129-
{ opt:"L" },
130-
{ opt:"AX+Y+L" },
131-
{ opt:"P" },
132-
{ name:"star", opt:"*" },
133-
{ opt:"LP" },
134-
{ opt:"B" },
135-
{ opt:"B1" },
136-
{ name:"docu", file: "graph.root", layout: "vert333", items: ['c1','c47','c4','c48','c41','c42','c43','c44','c45'], title:"several canvas from TGraph documentation page" }
137+
{ opt: "", file: "graph.root", item: "Graph;1" },
138+
{ opt: "L" },
139+
{ opt: "AX+Y+L" },
140+
{ opt: "P" },
141+
{ name: "star", opt:"*" },
142+
{ opt: "LP" },
143+
{ opt: "B" },
144+
{ opt: "B1" },
145+
{ name: "docu", file: "graph.root", layout: "vert333", items: ['c1','c47','c4','c48','c41','c42','c43','c44','c45'], title:"several canvas from TGraph documentation page" },
146+
{ name: "excl", file: "tutorials_graphs.root", item: "exclusiongraph2", title: "Exclusion draw exampl, output of tutorials/graphs/exclusiongraph2.C" },
147+
{ name: "plc", file: "tutorials_graphs.root", item: "graphpalettecolor", title: "Automatic set of graph colors, output of tutorials/graphs/graphpalettecolor.C" },
148+
{ name: "shade", file: "tutorials_graphs.root", item: "graphShade", title: "output of tutorials/graphs/graphShade.C" }
137149
],
138150
TGraphErrors : [
139151
{ opt:"", file: "graph.root", item: "GraphErrors;1" },
@@ -159,24 +171,29 @@ examples_main = {
159171
{ opt:"[]" , title: "do not draw main error lines, only ends as brackets"},
160172
{ opt:"2", title: "filled rec" }
161173
],
174+
TGraphPolar : [
175+
{ opt: "", file: "tutorials_graphs.root", item: "graphpolar", title: "Polar coordinates, output of tutorials/graphs/graphpolar.C" },
176+
{ name: "tut2", item: "graphpolar2", title: "Polar coordinates, output of tutorials/graphs/graphpolar2.C" },
177+
{ name: "tut3", item: "graphpolar3", title: "Polar coordinates, output of tutorials/graphs/graphpolar3.C" }
178+
],
162179
TMultiGraph : [
163-
{ name:"exclusion", file: "graph.root", item: "exclusion;1" },
164-
{ name:"c1", file: "multigraph.root", item: "c1;1" },
165-
{ name:"c2", item: "c2;1" },
166-
{ name:"c3", item: "c3;1" },
167-
{ name:"c4", item: "c4;1" },
168-
{ name:"c5", item: "c5;1" },
169-
{ name:"all", url: "?nobrowser&file=$$$multigraph.root&layout=grid3x2&items=[c1,c2,c3,c4,c5]" }
180+
{ name: "exclusion", file: "graph.root", item: "exclusion;1" },
181+
{ name: "c1", file: "multigraph.root", item: "c1;1" },
182+
{ name: "c2", item: "c2;1" },
183+
{ name: "c3", item: "c3;1" },
184+
{ name: "c4", item: "c4;1" },
185+
{ name: "c5", item: "c5;1" },
186+
{ name: "all", url: "?nobrowser&file=$$$multigraph.root&layout=grid3x2&items=[c1,c2,c3,c4,c5]" }
170187
],
171188
TGraph2D : [
172-
{ opt:"", file: "graph2d.root", item: "Graph2D", title: "example of TGraph2D" },
173-
{ name:"pcol", item: "pcol", title: "example of TGraph2D, color options" },
174-
{ opt:"err", item: "cerr", title: "example of TGraph2DErrors, errors drawing" }
189+
{ opt: "", file: "graph2d.root", item: "Graph2D", title: "example of TGraph2D" },
190+
{ name: "pcol", item: "pcol", title: "example of TGraph2D, color options" },
191+
{ opt: "err", item: "cerr", title: "example of TGraph2DErrors, errors drawing" }
175192
],
176193
TLatex : [
177-
{ name:"text", file: "latex.root", layout: "grid2x2", items: ['lva','ex1','ex2','ex3'], title: "Without MathJax.js rendering" },
178-
{ name:"latex", file: "latex.root", layout: "grid2x2", mathjax: true, items: ['lva','ex1','ex2','ex3'], title: "Without MathJax.js rendering" },
179-
{ name:"math", file: "latex.root", item: "math", title: "TMathText drawn always with MathJax.js rendering" }
194+
{ name: "latex", file: "latex.root", layout: "grid2x2", items: ['lva','ex1','ex2','ex3'], title: "Internal TLatex processor" },
195+
{ name: "mathjax", file: "latex.root", layout: "grid2x2", latex: "mathjax", items: ['lva','ex1','ex2','ex3'], title: "Render TLatex with MathJax.js" },
196+
{ name: "math", file: "latex.root", item: "math", title: "TMathText drawn always with MathJax.js rendering" }
180197
],
181198
Misc : [
182199
{ name: "ellipse", file: "ellipse.root", item: "c1;1", title: "TEllipse class" },
@@ -185,7 +202,9 @@ examples_main = {
185202
{ name: "sinfo", url: "?nobrowser&file=$$$hsimple.root&item=StreamerInfo", title: "List of streamer infos" },
186203
{ name: "3dmark", url: "?nobrowser&file=$$$mix2d3d.root&item=Canvas;1/pad4&opt=white", title: "TPloyMarker3D class" },
187204
{ name: "profile2d", file: "profile2d.root", item: "c1;1", title: "TProfile2D class" },
205+
{ name: "spline", file: "tutorials_graphs.root", item: 'splines_test', title: "TSpline3 and TSpline5 classes, Macro outputs from tutorials/graphs/splines_test.C" },
188206
{ name: "polyline", file: "polyline.root", item: "can;1", title: "TPolyLine class (produced with graphics/triangles.C)" },
189-
{ name: "tf2", json: "tf2.json.gz", opt: "nosave", title: "Example of TF2 drawing" }
207+
{ name: "class", json: "draw_class.json.gz", title: "Canvas, produced with DrawClass() call" }
208+
190209
]
191210
};

0 commit comments

Comments
 (0)