Skip to content

Commit 0fa2ac0

Browse files
committed
continuing to layer in zoom visx feature
co-cauthored-by: alex landeros <alexander.landeros1@gmail.com>
1 parent e5ed2e0 commit 0fa2ac0

File tree

1 file changed

+26
-3
lines changed

1 file changed

+26
-3
lines changed

src/app/components/History.tsx

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,28 @@ import React, { Component, useEffect, useState } from 'react';
22
import * as d3 from 'd3';
33
import LegendKey from './Legend';
44
import { 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

4060
function 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

Comments
 (0)