@@ -16,10 +16,10 @@ import { WaterfallEntryTiming } from "../../typing/waterfall";
1616function makeBlock ( rectData : RectData , className : string ) {
1717 const blockHeight = rectData . height - 1 ;
1818 const rect = svg . newRect ( {
19- " height" : blockHeight ,
20- " width" : misc . roundNumber ( rectData . width / rectData . unit ) + "%" ,
21- "x" : misc . roundNumber ( rectData . x / rectData . unit ) + "%" ,
22- "y" : rectData . y ,
19+ height : blockHeight ,
20+ width : misc . roundNumber ( rectData . width / rectData . unit ) + "%" ,
21+ x : misc . roundNumber ( rectData . x / rectData . unit ) + "%" ,
22+ y : rectData . y ,
2323 } , className ) ;
2424 if ( rectData . label ) {
2525 rect . appendChild ( svg . newTitle ( rectData . label ) ) ; // Add tile to wedge path
@@ -40,16 +40,16 @@ function makeBlock(rectData: RectData, className: string) {
4040 */
4141function segmentToRectData ( segment : WaterfallEntryTiming , rectData : RectData ) : RectData {
4242 return {
43- " cssClass" : timingTypeToCssClass ( segment . type ) ,
44- " height" : ( rectData . height - 6 ) ,
45- " hideOverlay" : rectData . hideOverlay ,
46- " label" : segment . type + " (" + Math . round ( segment . start ) + "ms - "
43+ cssClass : timingTypeToCssClass ( segment . type ) ,
44+ height : ( rectData . height - 6 ) ,
45+ hideOverlay : rectData . hideOverlay ,
46+ label : segment . type + " (" + Math . round ( segment . start ) + "ms - "
4747 + Math . round ( segment . end ) + "ms | total: " + Math . round ( segment . total ) + "ms)" ,
48- " showOverlay" : rectData . showOverlay ,
49- " unit" : rectData . unit ,
50- " width" : segment . total ,
51- "x" : segment . start || 0.001 ,
52- "y" : rectData . y ,
48+ showOverlay : rectData . showOverlay ,
49+ unit : rectData . unit ,
50+ width : segment . total ,
51+ x : segment . start || 0.001 ,
52+ y : rectData . y ,
5353 } as RectData ;
5454}
5555
@@ -73,7 +73,7 @@ function createTimingLabel(rectData: RectData, timeTotal: number, firstX: number
7373
7474 if ( percStart + ( roughTxtWidth / minWidth * 100 ) > 100 ) {
7575 percStart = firstX / rectData . unit - spacingPerc ;
76- txtEl = svg . newTextEl ( totalLabel , { x : `${ misc . roundNumber ( percStart ) } %` , y } , { " textAnchor" : "end" } ) ;
76+ txtEl = svg . newTextEl ( totalLabel , { x : `${ misc . roundNumber ( percStart ) } %` , y } , { textAnchor : "end" } ) ;
7777 }
7878
7979 return txtEl ;
@@ -152,14 +152,14 @@ export function createRequestLabelFull(x: number, y: number, name: string, heigh
152152 clipPath : `url(#titleFullClipPath)` ,
153153 } ) ;
154154 labelHolder . appendChild ( svg . newRect ( {
155- " height" : height - 4 ,
156- "rx" : 5 ,
157- "ry" : 5 ,
155+ height : height - 4 ,
156+ rx : 5 ,
157+ ry : 5 ,
158158 // for initial load performance use 500px as base width
159159 // it's updated one by one on hover
160- " width" : 500 ,
161- "x" : x - 3 ,
162- "y" : y + 3 ,
160+ width : 500 ,
161+ x : x - 3 ,
162+ y : y + 3 ,
163163 } , "label-full-bg" ) ) ;
164164 labelHolder . appendChild ( blockLabel ) ;
165165 return labelHolder ;
@@ -243,24 +243,24 @@ export function appendRequestLabels(rowFixed: SVGGElement, requestNumberLabel: S
243243export function createBgStripe ( y : number , height : number , isEven : boolean ) : SVGRectElement {
244244 const className = isEven ? "even" : "odd" ;
245245 return svg . newRect ( {
246- "height" : height ,
247- " width" : "100%" , // make up for the spacing
248- "x" : 0 ,
249- "y" : y ,
246+ height,
247+ width : "100%" , // make up for the spacing
248+ x : 0 ,
249+ y,
250250 } , className ) ;
251251}
252252
253253export function createNameRowBg ( y : number , rowHeight : number ) : SVGGElement {
254254 const rowFixed = svg . newG ( "row row-fixed" ) ;
255255
256256 rowFixed . appendChild ( svg . newRect ( {
257- " height" : rowHeight ,
258- " width" : "100%" ,
259- "x" : "0" ,
260- "y" : y ,
257+ height : rowHeight ,
258+ width : "100%" ,
259+ x : "0" ,
260+ y,
261261 } , "" ,
262262 {
263- " opacity" : 0 ,
263+ opacity : 0 ,
264264 } ) ) ;
265265
266266 return rowFixed ;
@@ -270,13 +270,13 @@ export function createRowBg(y: number, rowHeight: number): SVGGElement {
270270 const rowFixed = svg . newG ( "row row-flex" ) ;
271271
272272 rowFixed . appendChild ( svg . newRect ( {
273- " height" : rowHeight ,
274- " width" : "100%" ,
275- "x" : "0" ,
276- "y" : y ,
273+ height : rowHeight ,
274+ width : "100%" ,
275+ x : "0" ,
276+ y,
277277 } , "" ,
278278 {
279- " opacity" : 0 ,
279+ opacity : 0 ,
280280 } ) ) ;
281281
282282 return rowFixed ;
0 commit comments