From a70e78d8a2c219b4fca71e00096e70c52941b71f Mon Sep 17 00:00:00 2001 From: Melinda T Date: Fri, 2 Aug 2024 09:44:41 -0700 Subject: [PATCH 1/3] added gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 4d29575..d09e5c3 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,4 @@ npm-debug.log* yarn-debug.log* yarn-error.log* +.vscode/launch.json From c83a824ac2543b2e296c306cb862e08c098ed3c5 Mon Sep 17 00:00:00 2001 From: Melinda T Date: Fri, 9 Aug 2024 10:05:46 -0700 Subject: [PATCH 2/3] added visibility buttonIcon to reopen chart --- src/vis/Vis.tsx | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/src/vis/Vis.tsx b/src/vis/Vis.tsx index a6e29e6..a50a0bd 100644 --- a/src/vis/Vis.tsx +++ b/src/vis/Vis.tsx @@ -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'; @@ -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'; @@ -317,6 +319,33 @@ export default function Vis() { + + + { + setDisplayOptions( + solveDisplayOptions(displayOptions, 'displayGraph', true), + ); + }} + > + + + + + ); From 2eda983c8c536f31c1d5f10f3f86170e68340609 Mon Sep 17 00:00:00 2001 From: Melinda T Date: Fri, 9 Aug 2024 10:19:40 -0700 Subject: [PATCH 3/3] fixed visibility button format with prettier --- .env | 3 ++- package.json | 6 +++--- src/vis/Vis.tsx | 37 ++++++++++++++++++------------------- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/.env b/.env index 1b5cf68..439e3ca 100644 --- a/.env +++ b/.env @@ -1 +1,2 @@ -PUBLIC_URL=. \ No newline at end of file +PUBLIC_URL=. +PORT=3002 \ No newline at end of file diff --git a/package.json b/package.json index b76bbc0..e239399 100644 --- a/package.json +++ b/package.json @@ -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": [ diff --git a/src/vis/Vis.tsx b/src/vis/Vis.tsx index a50a0bd..921655c 100644 --- a/src/vis/Vis.tsx +++ b/src/vis/Vis.tsx @@ -319,22 +319,23 @@ export default function Vis() { - + + // new box + component='main' + sx={{ + backgroundColor: 'transparent', + overflow: 'none', + position: 'absolute', + right: '8px', + bottom: + 20 + + (displayValue(displayOptions, 'displayGraph') + ? chartHeight + 10 + : 0), + zIndex: '4', + }} + > { setDisplayOptions( @@ -342,8 +343,7 @@ export default function Vis() { ); }} > - - + @@ -377,7 +377,6 @@ export default function Vis() { - );