Skip to content

Commit d1c9788

Browse files
Merge branch 'dev' into links
2 parents f8bb363 + f419df6 commit d1c9788

File tree

4 files changed

+22
-6
lines changed

4 files changed

+22
-6
lines changed

reactime-website

src/app/components/StateRoute/ComponentMap/ComponentMap.tsx

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ const hoverClass = {
3434
stroke: '#ab269b' //pinkish
3535
}
3636

37+
/* Heat Map Colors (for links) */
38+
const lightOrange = '#F1B476';
39+
const darkOrange = '#E4765B';
40+
const red = '#C64442';
41+
const plum = '#8C2743';
3742

3843
const defaultMargin: DefaultMargin = {
3944
top: 30,
@@ -262,12 +267,20 @@ export default function ComponentMap({
262267
const strokeWidthIndex = y0 + L / (1 + Math.exp(-k * (childPropsLength - x0)));
263268
// const strokeWidthIndex = childPropsLength * 2.5 + 1;
264269
console.log('strokeWidthIndex: ', strokeWidthIndex);
265-
270+
266271
if (strokeWidthIndex <= 1) {
267-
// strokeWidthIndex = 1;
268-
stroke = '#000000';
272+
stroke = '#808080';
269273
} else {
270-
stroke = '#df6f37'
274+
if (childPropsLength <= 1) {
275+
stroke = lightOrange;
276+
} else if (childPropsLength <= 2) {
277+
stroke = darkOrange;
278+
} else if (childPropsLength <= 3) {
279+
stroke = red;
280+
} else {
281+
stroke = plum;
282+
}
283+
// stroke = '#df6f37'
271284
}
272285

273286
//testing hover functionality

src/app/components/StateRoute/StateRoute.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { useDispatch, useSelector } from 'react-redux';
1515
import PerformanceVisx from './PerformanceVisx/PerformanceVisx';
1616
import WebMetricsContainer from './WebMetrics/WebMetricsContainer';
1717
import { MainState, RootState, StateRouteProps } from '../../FrontendTypes';
18-
import AxContainer from './AxMap/AxMap';
18+
import type AxContainer from './AxMap/AxMap';
1919

2020
/*
2121
Loads the appropriate StateRoute view and renders the Map, Performance, History, Webmetrics, and Tree navbar buttons after clicking on the 'State' button located near the top rightmost corner.

src/app/styles/layout/_stateContainer.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,9 @@
9393
background-color: $navbar-unselected;
9494
text-decoration: none;
9595
color: $navbar-unselected-text;
96+
97+
border-top-right-radius: 10px;
98+
border-top-left-radius: 10px;
9699
}
97100

98101
.router-link:hover {

0 commit comments

Comments
 (0)