Skip to content

Commit 6e696a6

Browse files
committed
removed unnecessary comments and console logs
1 parent a850335 commit 6e696a6

File tree

1 file changed

+4
-13
lines changed
  • src/app/components/StateRoute/AxMap

1 file changed

+4
-13
lines changed

src/app/components/StateRoute/AxMap/Ax.tsx

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ export default function AxTree(props) {
115115
// array that holds the ax tree as a nested object and the root node initially
116116
const nodeAxArr = [];
117117

118+
// populates ax nodes with children property; visx recognizes 'children' in order to properly render a nested tree
118119
const organizeAxTree = (currNode, currAxSnapshot) => {
119120
if (currNode.childIds && currNode.childIds.length > 0) {
120121
currNode.children = [];
@@ -131,7 +132,7 @@ export default function AxTree(props) {
131132

132133
organizeAxTree(rootAxNode, currAxSnapshot);
133134

134-
// store each individual node, now with children property in nodeAxArr
135+
// stores each individual ax node with populated children property
135136
const populateNodeAxArr = (currNode) => {
136137
nodeAxArr.splice(0, nodeAxArr.length);
137138
nodeAxArr.push(currNode);
@@ -150,7 +151,7 @@ export default function AxTree(props) {
150151

151152
populateNodeAxArr(rootAxNode);
152153

153-
// ax Legend
154+
// Conditionally render ax legend component (RTK)
154155
const { axLegendButtonClicked } = useSelector((state: RootState) => state.axLegend);
155156
const dispatch = useDispatch();
156157

@@ -173,7 +174,6 @@ export default function AxTree(props) {
173174
</button>
174175
</div>
175176

176-
{/* svg references purple background */}
177177
<svg ref={containerRef} width={totalWidth + 0.2*totalWidth} height={totalHeight}>
178178
<LinearGradient id='root-gradient' from='#488689' to='#3c6e71' />
179179
<LinearGradient id='parent-gradient' from='#488689' to='#3c6e71' />
@@ -206,9 +206,8 @@ export default function AxTree(props) {
206206
// code relating to each node in tree
207207
{tree.descendants().map((node, key) => {
208208
const widthFunc = (name): number => {
209-
//returns a number that is related to the length of the name. Used for determining the node width.
209+
// returns a number that is related to the length of the name. Used for determining the node width.
210210
const nodeLength = name.length;
211-
//return nodeLength * 7 + 20; //uncomment this line if we want each node to be directly proportional to the name.length (instead of nodes of similar sizes to snap to the same width)
212211
if (nodeLength <= 5) return nodeLength + 60;
213212
if (nodeLength <= 10) return nodeLength + 130;
214213
return nodeLength + 160;
@@ -337,13 +336,6 @@ export default function AxTree(props) {
337336
y={-height / 2}
338337
x={-width / 2}
339338
fill="url('#parent-gradient')"
340-
//color={'#ff0000'}
341-
//fill={node.children ? nodeParentFill : nodeChildFill}
342-
//stroke={
343-
// node.data.isExpanded && node.data.children.length > 0
344-
// ? nodeParentStroke
345-
// : nodeChildStroke
346-
// }
347339
strokeWidth={1.5}
348340
strokeOpacity='1'
349341
rx={node.children ? 4 : 10}
@@ -441,7 +433,6 @@ export default function AxTree(props) {
441433
</TooltipInPortal>
442434
)}
443435

444-
{/* ax Legend */}
445436
<div>
446437
{ axLegendButtonClicked ?
447438
<AxLegend /> : ''

0 commit comments

Comments
 (0)