Skip to content

Commit f4fef8c

Browse files
committed
layered out zoom feature, due to performance
1 parent bd1ce51 commit f4fef8c

File tree

1 file changed

+12
-15
lines changed

1 file changed

+12
-15
lines changed

src/app/components/History.tsx

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,7 @@ import { changeView, changeSlider } from '../actions/actions';
77
import { Zoom } from '@visx/zoom';
88
import { localPoint } from '@visx/event';
99
import { RectClipPath } from '@visx/clip-path';
10-
import ZoomI from './zoomFt';
11-
12-
//* Visx Zoom feature stuff
13-
const bg = '';
14-
const points = [...new Array(1000)];
10+
// import ZoomI from './zoomFt';
1511

1612
// const colorScale = scaleLinear<number>({ range: [0, 1], domain: [0, 1000] });
1713
// const sizeScale = scaleLinear<number>({ domain: [0, 600], range: [0.5, 8] });
@@ -60,7 +56,7 @@ const filterHooks = (data: any[]) => {
6056

6157
function History(props: any) {
6258
//visx zoom first
63-
// const [showMiniMap, setShowMiniMap] = useState<boolean>(true);
59+
const [showMiniMap, setShowMiniMap] = useState<boolean>(true);
6460

6561
const { width, height, hierarchy, dispatch, sliderIndex, viewIndex } = props;
6662
console.log(
@@ -266,17 +262,18 @@ function History(props: any) {
266262
// console.log('have we hit maked3dtree');
267263
// below we are rendering the LegendKey component and passing hierarchy as props
268264
// then rendering each node in History tab to render using D3
265+
269266
return (
270267
<>
271-
<LegendKey hierarchy={hierarchy} />
272-
{/* <ZoomI width={width} height={height}> */}
273-
<div
274-
ref={HistoryRef}
275-
className="history-d3-div"
276-
id="historyContainer"
277-
// position="absolute"
278-
/>
279-
{/* </ZoomI> */}
268+
<div>
269+
<LegendKey hierarchy={hierarchy} />
270+
<div
271+
ref={HistoryRef}
272+
className="history-d3-div"
273+
id="historyContainer"
274+
// position="absolute"
275+
/>
276+
</div>
280277
</>
281278
);
282279
}

0 commit comments

Comments
 (0)