@@ -16,8 +16,10 @@ function namestring (func, file, line) {
16
16
17
17
function process ( view , tree ) {
18
18
tree . name = "Program"
19
- return prewalk ( tree , ( { count, children, location, func, path, line} ) => ( {
19
+ return prewalk ( tree , ( { count, classes, children,
20
+ location, func, path, line} ) => ( {
20
21
count,
22
+ classes,
21
23
children,
22
24
onmouseover : ( ) => view . current = { func, location, line, count} ,
23
25
onmouseout : ( ) => view . current = null ,
@@ -43,10 +45,11 @@ function flatten (tree) {
43
45
}
44
46
45
47
export class ProfileViewer {
46
- constructor ( { data, save= null } ) {
48
+ constructor ( { data, customClass = '' , save= null } ) {
47
49
this . rawData = data
48
50
this . data = process ( this , data )
49
51
this . save = save
52
+ this . customClass = customClass
50
53
this . highlights = require ( '../editor/highlights' ) . profileLines ( flatten ( this . rawData ) )
51
54
52
55
this . toolbar = view ( ( ) => this . toolbarView ( this . current ) )
@@ -86,7 +89,7 @@ export class ProfileViewer {
86
89
}
87
90
88
91
render ( ) {
89
- return < Canopy data = { this . data } />
92
+ return < Canopy className = { this . customClass } data = { this . data } />
90
93
}
91
94
92
95
build ( ) {
0 commit comments