Skip to content

Commit a850335

Browse files
committed
removed various console logs and commented out code
1 parent 8132b71 commit a850335

File tree

1 file changed

+0
-144
lines changed
  • src/app/components/StateRoute/AxMap

1 file changed

+0
-144
lines changed

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

Lines changed: 0 additions & 144 deletions
Original file line numberDiff line numberDiff line change
@@ -14,135 +14,6 @@ import AxLegend from './axLegend';
1414
import { renderAxLegend } from '../../../slices/AxSlices/axLegendSlice';
1515
import type { RootState } from '../../../store';
1616

17-
//still using below themes?
18-
const theme = {
19-
scheme: 'monokai',
20-
author: 'wimer hazenberg (http://www.monokai.nl)',
21-
base00: '#272822',
22-
base01: '#383830',
23-
base02: '#49483e',
24-
base03: '#75715e',
25-
base04: '#a59f85',
26-
base05: '#f8f8f2',
27-
base06: '#f5f4f1',
28-
base07: '#f9f8f5',
29-
base08: '#f92672',
30-
base09: '#fd971f',
31-
base0A: '#f4bf75',
32-
base0B: '#a6e22e',
33-
base0C: '#a1efe4',
34-
base0D: '#66d9ef',
35-
base0E: '#ae81ff',
36-
base0F: '#cc6633',
37-
};
38-
39-
interface TreeNode {
40-
name?: {
41-
sources?: any[];
42-
type?: string;
43-
value?: string;
44-
};
45-
isExpanded?: boolean;
46-
children?: TreeNode[];
47-
backendDOMNodeId?: number;
48-
childIds?: string[];
49-
ignored?: boolean;
50-
nodeId?: string;
51-
ignoredReasons?: any[];
52-
}
53-
54-
// example data from visx
55-
56-
// pulling name property value to name the node, need to adjust data pull from ax tree to reassign name if the node is ignored
57-
58-
const data: TreeNode = {
59-
name: {
60-
sources: [{ attribute: 'aria-labelledby', type: 'relatedElement' }],
61-
type: 'computedString',
62-
value: 'Reactime MVP',
63-
},
64-
backendDOMNodeId: 1,
65-
childIds: ['46'],
66-
ignored: false,
67-
children: [
68-
{
69-
name: {
70-
sources: [{ attribute: 'aria-labelledby', type: 'relatedElement' }],
71-
type: 'computedString',
72-
value: '',
73-
},
74-
backendDOMNodeId: 7,
75-
childIds: ['47'],
76-
ignored: true,
77-
},
78-
{
79-
name: {
80-
sources: [{ attribute: 'aria-labelledby', type: 'relatedElement' }],
81-
type: 'computedString',
82-
value: 'Tic-Tac-Toe',
83-
},
84-
backendDOMNodeId: 8,
85-
childIds: ['48'],
86-
ignored: false,
87-
},
88-
],
89-
};
90-
91-
const nodeAxArr = [
92-
{
93-
name: {
94-
sources: [{ attribute: 'aria-labelledby', type: 'relatedElement' }],
95-
type: 'computedString',
96-
value: 'Reactime MVP',
97-
},
98-
backendDOMNodeId: 1,
99-
childIds: ['46'],
100-
ignored: false,
101-
children: [
102-
{
103-
name: {
104-
sources: [{ attribute: 'aria-labelledby', type: 'relatedElement' }],
105-
type: 'computedString',
106-
value: '',
107-
},
108-
backendDOMNodeId: 7,
109-
childIds: ['47'],
110-
ignored: true,
111-
},
112-
{
113-
name: {
114-
sources: [{ attribute: 'aria-labelledby', type: 'relatedElement' }],
115-
type: 'computedString',
116-
value: 'Tic-Tac-Toe',
117-
},
118-
backendDOMNodeId: 8,
119-
childIds: ['48'],
120-
ignored: false,
121-
},
122-
],
123-
},
124-
{
125-
name: {
126-
sources: [{ attribute: 'aria-labelledby', type: 'relatedElement' }],
127-
type: 'computedString',
128-
value: '',
129-
},
130-
backendDOMNodeId: 7,
131-
childIds: ['47'],
132-
ignored: true,
133-
},
134-
{
135-
name: {
136-
sources: [{ attribute: 'aria-labelledby', type: 'relatedElement' }],
137-
type: 'computedString',
138-
value: 'Tic-Tac-Toe',
139-
},
140-
backendDOMNodeId: 8,
141-
childIds: ['48'],
142-
ignored: false,
143-
},
144-
];
145-
14617
const defaultMargin = {
14718
top: 30,
14819
left: 30,
@@ -166,8 +37,6 @@ export type LinkTypesProps = {
16637
export default function AxTree(props) {
16738
const { currLocation, axSnapshots, width, height } = props;
16839

169-
170-
17140
let margin = defaultMargin;
17241
let totalWidth = width;
17342
let totalHeight = height;
@@ -184,8 +53,6 @@ export default function AxTree(props) {
18453
hideTooltip, // function to close a tooltip
18554
} = useTooltip(); // returns an object with several properties that you can use to manage the tooltip state of your component
18655

187-
// let nameVal = JSON.stringify(tooltipData)
188-
// console.log('nameVal', nameVal);
18956
const {
19057
containerRef, // Access to the container's bounding box. This will be empty on first render.
19158
TooltipInPortal, // TooltipWithBounds in a Portal, outside of your component DOM tree
@@ -208,14 +75,6 @@ export default function AxTree(props) {
20875
pointerEvents: 'all !important',
20976
};
21077

211-
// const formatRenderTime = (time: number): string => {
212-
// if (!time) return 'No time information';
213-
// const renderTime = time.toFixed(3);
214-
// return `${renderTime} ms `;
215-
// };
216-
217-
218-
21978
const [layout, setLayout] = useState('cartesian');
22079
const [orientation, setOrientation] = useState('horizontal');
22180
const [linkType, setLinkType] = useState('diagonal');
@@ -273,7 +132,6 @@ export default function AxTree(props) {
273132
organizeAxTree(rootAxNode, currAxSnapshot);
274133

275134
// store each individual node, now with children property in nodeAxArr
276-
// need to consider order, iterate through the children property first?
277135
const populateNodeAxArr = (currNode) => {
278136
nodeAxArr.splice(0, nodeAxArr.length);
279137
nodeAxArr.push(currNode);
@@ -541,7 +399,6 @@ export default function AxTree(props) {
541399
fontFamily='Roboto'
542400
textAnchor='middle'
543401
style={{ pointerEvents: 'none' }}
544-
//fill={node.depth === 0 ? '#161521' : node.children ? 'white' : '#161521'}
545402
>
546403
{node.data.name.value}
547404
</text>
@@ -579,7 +436,6 @@ export default function AxTree(props) {
579436
</div>
580437
<div>
581438
<ToolTipDataDisplay containerName='Ax Node Info' dataObj={tooltipData} />
582-
{/* <ToolTipDataDisplay containerName='State'dataObj={tooltipData}/> */}
583439
</div>
584440
</div>
585441
</TooltipInPortal>

0 commit comments

Comments
 (0)