@@ -30,6 +30,7 @@ import type {
3030 ReactHoverContextInfo ,
3131 ReactMeasure ,
3232 ReactProfilerData ,
33+ ReactProfilerDataV2 ,
3334} from './types' ;
3435
3536type ContextMenuContextData = { |
@@ -41,11 +42,17 @@ type ContextMenuContextData = {|
4142
4243type Props = { |
4344 profilerData : ReactProfilerData ,
45+ profilerDataV2 : ReactProfilerDataV2 ,
4446 flamechart : FlamechartData ,
4547 schedulerCanvasHeight : number ,
4648| } ;
4749
48- function CanvasPage ( { profilerData, flamechart, schedulerCanvasHeight} : Props ) {
50+ function CanvasPage ( {
51+ profilerData,
52+ profilerDataV2,
53+ flamechart,
54+ schedulerCanvasHeight,
55+ } : Props ) {
4956 return (
5057 < div
5158 className = { styles . CanvasPage }
@@ -54,6 +61,7 @@ function CanvasPage({profilerData, flamechart, schedulerCanvasHeight}: Props) {
5461 { ( { height, width} : { height : number , width : number } ) => (
5562 < AutoSizedCanvas
5663 data = { profilerData }
64+ dataV2 = { profilerDataV2 }
5765 flamechart = { flamechart }
5866 height = { height }
5967 schedulerCanvasHeight = { schedulerCanvasHeight }
@@ -96,6 +104,7 @@ const zoomToBatch = (
96104
97105type AutoSizedCanvasProps = { |
98106 data : ReactProfilerData ,
107+ dataV2 : ReactProfilerDataV2 ,
99108 flamechart : FlamechartData ,
100109 height : number ,
101110 schedulerCanvasHeight : number ,
@@ -104,6 +113,7 @@ type AutoSizedCanvasProps = {|
104113
105114function AutoSizedCanvas ( {
106115 data,
116+ dataV2,
107117 flamechart,
108118 height,
109119 schedulerCanvasHeight,
@@ -117,7 +127,7 @@ function AutoSizedCanvas({
117127 canvasWidth : width ,
118128 fixedColumnWidth : LABEL_FIXED_WIDTH ,
119129 fixedHeaderHeight : HEADER_HEIGHT_FIXED ,
120- unscaledContentWidth : data . duration ,
130+ unscaledContentWidth : dataV2 . duration ,
121131 unscaledContentHeight :
122132 schedulerCanvasHeight +
123133 flamechart . layers . length * FLAMECHART_FRAME_HEIGHT ,
0 commit comments