Skip to content

Commit 6f72b60

Browse files
committed
file cleanup before pull
1 parent 2297242 commit 6f72b60

File tree

2 files changed

+5
-26
lines changed

2 files changed

+5
-26
lines changed

src/app/components/Map.tsx

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ const Map = (props) => {
4444
root.descendants().forEach((d, i) => {
4545
d.id = i;
4646
d._children = d.children;
47-
if (d.depth === 9) d.children = null;
47+
// use to limit depth of children rendered
48+
//if (d.depth === 5) d.children = null;
4849
});
4950

5051
// Create Container for D3 Visualizations
@@ -233,29 +234,7 @@ const Map = (props) => {
233234
.drag()
234235

235236
);
236-
// function dragStarted(): any {
237-
// d3.select(this).raise();
238-
// svg.attr('cursor', 'grabbing');
239-
// }
240-
// function dragged(d: any): any {
241-
// d3.select(this)
242-
// .attr('dx', (d.x = d3.event.x))
243-
// .attr('dy', (d.y = d3.event.y));
244-
// }
245-
// function dragEnded(): any {
246-
// svg.attr('cursor', 'grab');
247-
// }
248-
249-
// Zoom Data from Canvas
250-
251-
// let test: any = document.getElementById('canvas').children[0];
252-
// console.log('from canvas', test.transform);
253-
// let newX = test.transform.baseVal[0].matrix.e
254-
// let newY = test.transform.baseVal[0].matrix.f
255-
// let newK = test.transform.baseVal[1].matrix.a
256-
// console.log(newX)
257-
// console.log(newY)
258-
// console.log(newK)
237+
259238

260239
// call update on node click
261240
update(root);

src/app/components/StateRoute.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ const StateRoute = (props: StateRouteProps) => {
4949
//Map
5050
const renderMap = () => {
5151
if (hierarchy) {
52-
return <Map viewIndex={viewIndex} snapshots={snapshots} />;
52+
return <Map viewIndex={viewIndex} snapshots={snapshots} x={x} y={y} k={k} setZoomState={setZoomState} />;
5353
}
5454
return <div className="noState">{NO_STATE_MSG}</div>;
5555
};
@@ -130,7 +130,7 @@ const StateRoute = (props: StateRouteProps) => {
130130
</NavLink>
131131
</div>
132132
<Switch>
133-
<Route path="/map" render ={(props) => <Map viewIndex={viewIndex} snapshots={snapshots} x={x} y={y} k={k} setZoomState={setZoomState}/> } />
133+
<Route path="/map" render={renderMap} />
134134
<Route path="/chart" render={renderChart} />
135135
<Route path="/performance" render={renderPerfView} />
136136
<Route path="/" render={renderTree} />

0 commit comments

Comments
 (0)