Skip to content

Commit d5883b8

Browse files
committed
removed ax legend button
1 parent 034a11b commit d5883b8

File tree

4 files changed

+17
-39
lines changed

4 files changed

+17
-39
lines changed

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

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,12 @@ import { useDispatch, useSelector } from 'react-redux';
33
import { Group } from '@visx/group';
44
import { hierarchy, Tree } from '@visx/hierarchy';
55
import { LinearGradient } from '@visx/gradient';
6-
import { pointRadial } from 'd3-shape';
76
import LinkControls from './axLinkControls';
87
import getLinkComponent from './getAxLinkComponents';
98
import { useTooltip, useTooltipInPortal, defaultStyles } from '@visx/tooltip';
109
import ToolTipDataDisplay from './ToolTipDataDisplay';
1110
import { ToolTipStyles } from '../../../FrontendTypes';
1211
import { localPoint } from '@visx/event';
13-
import AxLegend from './axLegend';
14-
import { renderAxLegend } from '../../../slices/AxSlices/axLegendSlice';
15-
import type { RootState } from '../../../store';
1612

1713
const defaultMargin = {
1814
top: 30,
@@ -76,7 +72,7 @@ export default function AxTree(props) {
7672
};
7773

7874
const [orientation, setOrientation] = useState('horizontal');
79-
const [linkType, setLinkType] = useState('diagonal');
75+
const [linkType, setLinkType] = useState('step');
8076
const [stepPercent, setStepPercent] = useState(0.0);
8177

8278
const innerWidth: number = totalWidth - margin.left - margin.right;
@@ -147,7 +143,6 @@ export default function AxTree(props) {
147143
populateNodeAxArr(rootAxNode);
148144

149145
// Conditionally render ax legend component (RTK)
150-
const { axLegendButtonClicked } = useSelector((state: RootState) => state.axLegend);
151146
const dispatch = useDispatch();
152147

153148
return totalWidth < 10 ? null : (
@@ -161,10 +156,6 @@ export default function AxTree(props) {
161156
setLinkType={setLinkType}
162157
setStepPercent={setStepPercent}
163158
/>
164-
165-
<button id='axLegendButton' onClick={() => dispatch(renderAxLegend())}>
166-
Generate Ax Tree Legend
167-
</button>
168159
</div>
169160

170161
<svg ref={containerRef} width={totalWidth + 0.2 * totalWidth} height={totalHeight}>
@@ -197,7 +188,6 @@ export default function AxTree(props) {
197188
fill='none'
198189
/>
199190
))}
200-
// code relating to each node in tree
201191
{tree.descendants().map((node, key) => {
202192
const widthFunc = (name): number => {
203193
// returns a number that is related to the length of the name. Used for determining the node width.
@@ -424,8 +414,6 @@ export default function AxTree(props) {
424414
</div>
425415
</TooltipInPortal>
426416
)}
427-
428-
<div>{axLegendButtonClicked ? <AxLegend /> : ''}</div>
429417
</div>
430418
);
431419
}

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ const colors = {
1818
base07: '#e7e9db',
1919
base08: '#ef6155',
2020
base09: '#824508', //base09 is orange for booleans and numbers. This base in particular fails to match the entered color.
21-
// base09: '#592bad', // alternative purple
2221
base0A: '#fec418',
2322
base0B: '#48b685',
2423
base0C: '#5bc4bf',

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

Lines changed: 0 additions & 25 deletions
This file was deleted.

src/app/styles/components/_componentMap.scss

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,4 +131,20 @@
131131
outline: none;
132132
margin: 0;
133133
cursor: pointer;
134+
135+
&::-webkit-slider-thumb {
136+
appearance: none;
137+
width: 16px;
138+
height: 16px;
139+
border-radius: 50%;
140+
background: #14b8a6;
141+
cursor: pointer;
142+
transition: all 200ms ease;
143+
border: none;
144+
145+
&:hover {
146+
background: #0d9488;
147+
transform: scale(1.1);
148+
}
149+
}
134150
}

0 commit comments

Comments
 (0)