@@ -9,11 +9,11 @@ import LegendKey from './legend';
99import History from './History' ;
1010// import { hierarchy } from '@visx/hierarchy';
1111
12- const bg = '' ;
13- const points = [ ...new Array ( 1000 ) ] ;
12+ // const bg = '';
13+ // const points = [...new Array(1000)];
1414
15- const colorScale = scaleLinear < number > ( { range : [ 0 , 1 ] , domain : [ 0 , 1000 ] } ) ;
16- const sizeScale = scaleLinear < number > ( { domain : [ 0 , 600 ] , range : [ 0.5 , 8 ] } ) ;
15+ // const colorScale = scaleLinear<number>({ range: [0, 1], domain: [0, 1000] });
16+ // const sizeScale = scaleLinear<number>({ domain: [0, 600], range: [0.5, 8] });
1717
1818const initialTransform = {
1919 scaleX : 1.27 ,
@@ -32,7 +32,7 @@ const initialTransform = {
3232export default function ZoomI ( props : any ) {
3333 const [ showMiniMap , setShowMiniMap ] = useState < boolean > ( true ) ;
3434 // const { width, height, hierarchy, dispatch, sliderIndex, viewIndex } = props;
35- const { width, height } = props ;
35+ const { width, height, hierarchy , dispatch , sliderIndex , viewIndex } = props ;
3636 // const genenerator: GenPhyllotaxisFunction = genPhyllotaxis({
3737 // radius: 10,
3838 // width,
@@ -51,16 +51,25 @@ export default function ZoomI(props: any) {
5151 scaleYMax = { 4 }
5252 transformMatrix = { initialTransform }
5353 >
54+ { /* <div
55+ ref={HistoryRef}
56+ className="history-d3-div"
57+ id="historyContainer"
58+ // position="absolute"
59+ /> */ }
5460 { ( zoom ) => (
5561 < div className = "relative" >
5662 < svg
5763 width = { width }
5864 height = { height }
5965 style = { { cursor : zoom . isDragging ? 'grabbing' : 'grab' } }
6066 >
61- < RectClipPath id = "zoom-clip" width = { width } height = { height } />
62- < rect width = { width } height = { height } rx = { 14 } fill = { bg } />
63- < g transform = { zoom . toString ( ) } > { /* invoke them here */ } </ g >
67+ < RectClipPath id = "zoom-clip" width = { 800 } height = { 600 } />
68+ < rect width = { width } height = { height } />
69+ < g transform = { zoom . toString ( ) } >
70+ { /* invoke them here */ }
71+ < h1 color = "yellowgreen" > Hello</ h1 >
72+ </ g >
6473 < rect
6574 width = { width }
6675 height = { height }
@@ -174,3 +183,21 @@ export default function ZoomI(props: any) {
174183 </ >
175184 ) ;
176185}
186+
187+ /*
188+ return (
189+ <>
190+ <Zoom>
191+ <div>
192+ <LegendKey hierarchy={hierarchy} />
193+ <div
194+ ref={HistoryRef}
195+ className="history-d3-div"
196+ id="historyContainer"
197+ // position="absolute"
198+ />
199+ </div>
200+ </Zoom>
201+ </>
202+ );
203+ */
0 commit comments