Skip to content

Commit 339b1de

Browse files
committed
optimizing LegendKey to integrate with Zoom feature
1 parent fd1242d commit 339b1de

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

src/app/components/StateRoute.tsx

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import ComponentMap from './ComponentMap';
1717
// import PerfView from './PerfView';
1818
import AtomsRelationship from './AtomsRelationship.jsx';
1919
import PerformanceVisx from './PerformanceVisx';
20+
import ZoomI from './zoomFt';
2021

2122
import { changeView, changeSlider } from '../actions/actions';
2223
import { useStoreContext } from '../store';
@@ -76,21 +77,23 @@ const StateRoute = (props: StateRouteProps) => {
7677
// the hierarchy gets set on the first click in the page
7778
// when the page is refreshed we may not have a hierarchy, so we need to check if hierarchy was initialized
7879
// if true involk render chart with hierarchy
79-
//* we wrap History in a ParentSize div, in order to make use of Visx's Zoom funcationality
80+
//* we wrap History in a ParentSize div, in order to make use of Visx's Zoom functionality
8081
const renderHistory = () => {
8182
if (hierarchy) {
8283
return (
8384
<div>
8485
<ParentSize>
8586
{({ width, height }) => (
86-
<History
87-
width={width}
88-
height={height}
89-
hierarchy={hierarchy}
90-
dispatch={dispatch}
91-
sliderIndex={sliderIndex}
92-
viewIndex={viewIndex}
93-
/>
87+
<ZoomI>
88+
<History
89+
width={width}
90+
height={height}
91+
hierarchy={hierarchy}
92+
dispatch={dispatch}
93+
sliderIndex={sliderIndex}
94+
viewIndex={viewIndex}
95+
/>
96+
</ZoomI>
9497
)}
9598
</ParentSize>
9699
</div>

0 commit comments

Comments
 (0)