@@ -2,8 +2,28 @@ import React, { Component, useEffect, useState } from 'react';
22import * as d3 from 'd3' ;
33import LegendKey from './Legend' ;
44import { changeView , changeSlider } from '../actions/actions' ;
5- import { useStoreContext } from '../store' ;
6- import { string } from 'prop-types' ;
5+ // import { useStoreContext } from '../store';
6+ // import { string } from 'prop-types';
7+ import { Zoom } from '@visx/zoom' ;
8+ import { localPoint } from '@visx/event' ;
9+ import { RectClipPath } from '@visx/clip-path' ;
10+
11+ // Visx Zoom feature stuff
12+ const bg = '' ;
13+ const points = [ ...new Array ( 1000 ) ] ;
14+
15+ // const colorScale = scaleLinear<number>({ range: [0, 1], domain: [0, 1000] });
16+ // const sizeScale = scaleLinear<number>({ domain: [0, 600], range: [0.5, 8] });
17+
18+ const initialTransform = {
19+ scaleX : 1.27 ,
20+ scaleY : 1.27 ,
21+ translateX : - 211.62 ,
22+ translateY : 162.59 ,
23+ skewX : 0 ,
24+ skewY : 0 ,
25+ } ;
26+
727/**
828 * @var colors: Colors array for the diffrerent node branches, each color is for a different branch
929 */
@@ -38,7 +58,10 @@ const filterHooks = (data: any[]) => {
3858 */
3959
4060function History ( props ) {
41- const { hierarchy, dispatch, sliderIndex, viewIndex } = props ;
61+ //visx zoom first
62+ const [ showMiniMap , setShowMiniMap ] = useState < boolean > ( true ) ;
63+
64+ const { width, height, hierarchy, dispatch, sliderIndex, viewIndex } = props ;
4265 let root = JSON . parse ( JSON . stringify ( hierarchy ) ) ;
4366 let isRecoil = false ;
4467 console . log ( 'before makedTree, hierarchy is, ' , hierarchy ) ;
0 commit comments