Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding visibility Button #28 #42

Merged
merged 3 commits into from
Aug 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading