@@ -7,8 +7,9 @@ import { changeView, changeSlider } from '../actions/actions';
77import { Zoom } from '@visx/zoom' ;
88import { localPoint } from '@visx/event' ;
99import { RectClipPath } from '@visx/clip-path' ;
10+ import ZoomI from './zoomFt' ;
1011
11- // Visx Zoom feature stuff
12+ //* Visx Zoom feature stuff
1213const bg = '' ;
1314const points = [ ...new Array ( 1000 ) ] ;
1415
@@ -57,14 +58,17 @@ const filterHooks = (data: any[]) => {
5758 * @method maked3Tree :Creates a new D3 Tree
5859 */
5960
60- function History ( props ) {
61+ function History ( props : any ) {
6162 //visx zoom first
62- const [ showMiniMap , setShowMiniMap ] = useState < boolean > ( true ) ;
63+ // const [showMiniMap, setShowMiniMap] = useState<boolean>(true);
6364
6465 const { width, height, hierarchy, dispatch, sliderIndex, viewIndex } = props ;
66+ console . log (
67+ `inside History tab -> width is ${ width } and height is ${ height } `
68+ ) ;
6569 let root = JSON . parse ( JSON . stringify ( hierarchy ) ) ;
6670 let isRecoil = false ;
67- console . log ( 'before makedTree, hierarchy is, ' , hierarchy ) ;
71+ // console.log('before makedTree, hierarchy is, ', hierarchy);
6872 let HistoryRef = React . createRef ( root ) ; //React.createRef(root);
6973 useEffect ( ( ) => {
7074 maked3Tree ( ) ;
@@ -99,7 +103,7 @@ function History(props) {
99103 // d3.hierarchy constructs a root node from the specified hierarchical data
100104 // (our object titled dataset), which must be an object representing the root node
101105 const hierarchy = d3 . hierarchy ( root ) ;
102- console . log ( 'after maked3tree, hierarchy is now: ' , hierarchy ) ;
106+ // console.log('after maked3tree, hierarchy is now: ', hierarchy);
103107 const tree = d3
104108 . tree ( )
105109 . nodeSize ( [ width / 10 , height / 10 ] )
@@ -259,20 +263,20 @@ function History(props) {
259263 return [ ( y = + y ) * Math . cos ( ( x -= Math . PI / 2 ) ) , y * Math . sin ( x ) ] ;
260264 }
261265 } ;
262- console . log ( 'have we hit maked3dtree' ) ;
266+ // console.log('have we hit maked3dtree');
263267 // below we are rendering the LegendKey component and passing hierarchy as props
264268 // then rendering each node in History tab to render using D3
265269 return (
266270 < >
267- < div >
268- < LegendKey hierarchy = { hierarchy } />
269- < div
270- ref = { HistoryRef }
271- className = "history-d3-div"
272- id = "historyContainer"
273- // position="absolute"
274- />
275- </ div >
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> */ }
276280 </ >
277281 ) ;
278282}
0 commit comments