Skip to content

Commit

Permalink
Merge pull request #42 from Local-Connectivity-Lab/issue28
Browse files Browse the repository at this point in the history
Adding visibility Button #28
  • Loading branch information
mmt456 authored Aug 9, 2024
2 parents af913de + 2eda983 commit aef0110
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
PUBLIC_URL=.
PUBLIC_URL=.
PORT=3002
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.vscode/launch.json
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@
"web-vitals": "^2.1.2"
},
"scripts": {
"start": "PORT=3002 react-scripts start",
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"format": "prettier --write --config ./prettierrc.json 'src/**/*.{ts,tsx}'",
"format-check": "prettier --check --config ./prettierrc.json 'src/**/*.{ts,tsx}'"
"format": "prettier --write --config ./prettierrc.json src/**/*.{ts,tsx}",
"format-check": "prettier --check --config ./prettierrc.json src/**/*.{ts,tsx}"
},
"eslintConfig": {
"extends": [
Expand Down
29 changes: 29 additions & 0 deletions src/vis/Vis.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import IconButton from '@mui/material/IconButton';
import Container from '@mui/material/Container';
import MenuIcon from '@mui/icons-material/Menu';
import ChevronLeftIcon from '@mui/icons-material/ChevronLeft';
import Visibility from '@mui/icons-material/Visibility';
import { homeListItems } from '../ListItems';
import MapSelectionRadio, { MapType } from './MapSelectionRadio';
import DisplaySelection from './DisplaySelection';
Expand All @@ -25,6 +26,7 @@ import LineChart from './LineChart';
import axios from 'axios';
import { API_URL } from '../utils/config';
import { UNITS, MAP_TYPE_CONVERT } from './MeasurementMap';
import { solveDisplayOptions } from './DisplaySelection';

// import { setOptions } from 'leaflet';

Expand Down Expand Up @@ -317,7 +319,9 @@ export default function Vis() {
</Card>
</Fade>
</Box>

<Box
// new box
component='main'
sx={{
backgroundColor: 'transparent',
Expand All @@ -331,6 +335,31 @@ export default function Vis() {
: 0),
zIndex: '4',
}}
>
<IconButton
onClick={() => {
setDisplayOptions(
solveDisplayOptions(displayOptions, 'displayGraph', true),
);
}}
>
<Visibility></Visibility>
</IconButton>
</Box>
<Box
component='main'
sx={{
backgroundColor: 'transparent',
overflow: 'none',
position: 'absolute',
right: '8px',
bottom:
20 +
(displayValue(displayOptions, 'displayGraph')
? chartHeight + 10
: +50),
zIndex: '5',
}}
>
<Fade
mountOnEnter
Expand Down

0 comments on commit aef0110

Please sign in to comment.