Skip to content

Commit 16a607a

Browse files
(updated) performance component
1 parent edb732e commit 16a607a

File tree

4 files changed

+14
-134
lines changed

4 files changed

+14
-134
lines changed

src/app/components/PerfView.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,13 @@ interface PerfViewProps {
3232

3333
const PerfView = (props: PerfViewProps) => {
3434

35-
36-
/* // ------------- CIRCLES ----------------------
35+
// ------------- CIRCLES ----------------------
3736
const { viewIndex, width, height, setNoRenderData } = props;
3837
let { snapshots } = props;
3938
const adjustedSize = Math.min(width, height);
4039
const svgRef = useRef(null);
40+
41+
console.log(snapshots)
4142

4243
let indexToDisplay: number | null = null;
4344
if (viewIndex < 0) indexToDisplay = snapshots.length - 1;
@@ -231,7 +232,7 @@ const PerfView = (props: PerfViewProps) => {
231232
handleNoRenderData,
232233
]);
233234

234-
// ------------- CIRCLES ---------------------- */
235+
// ------------- CIRCLES ----------------------
235236

236237

237238
return (

src/app/components/PerformanceVisx.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ const colorScale = scaleOrdinal<CityName, string>({
9292
let tooltipTimeout: number;
9393

9494
/* EXPORT COMPONENT */
95-
export default function Example({
95+
export default function PerformanceVisx({
9696
width,
9797
height,
9898
events = false,
@@ -111,6 +111,8 @@ export default function Example({
111111

112112
if (width < 10) return null;
113113
// bounds
114+
115+
// width, height
114116
const xMax = width;
115117
const yMax = height - margin.top - 100;
116118

src/app/components/StateRoute.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ import Tree from './Tree';
1515
import ComponentMap from './ComponentMap';
1616
import PerfView from './PerfView';
1717
import AtomsRelationship from './AtomsRelationship.jsx';
18+
import PerformanceVisx from './PerformanceVisx.jsx';
19+
import ParentSize from '@visx/responsive/lib/components/ParentSize';
20+
21+
1822

1923
const History = require('./History').default;
2024

@@ -95,6 +99,9 @@ const StateRoute = (props: StateRouteProps) => {
9599
const renderPerfView = () => {
96100
if (hierarchy) {
97101
return (
102+
103+
// <PerformanceVisx width={600} height={1000} />
104+
98105
<PerfView
99106
viewIndex={viewIndex}
100107
snapshots={snapshots}

src/app/components/snapshots.js

Lines changed: 0 additions & 130 deletions
This file was deleted.

0 commit comments

Comments
 (0)