Loading app/src/components/container/App.jsx +1 −5 Original line number Diff line number Diff line Loading @@ -56,15 +56,11 @@ export default function App() { const [footprintData, setFootprintData] = React.useState([]); const showHideSort = () => { console.log(showSidePanel + " -> ") console.log("Show/Hide"); setShowSidePanel(!showSidePanel); setSidePanelVisStyle(showSidePanel ? css.shown : css.hidden); console.log(" -> " + showSidePanel); } const handlePanelLayout = (event) => { console.log("Expand/Collapse"); setExpandResults(expandResults => !expandResults); setResultsExpandStyle(expandResults ? css.expanded : css.stacked); } Loading @@ -79,7 +75,7 @@ export default function App() { const handleFootprintClick = () => { setFootprintData(getFeatures); console.log(footprintData); //console.log(footprintData); }; return ( Loading app/src/components/presentational/SearchAndFilterInput.jsx +57 −30 Original line number Diff line number Diff line Loading @@ -21,8 +21,11 @@ import InputLabel from '@mui/material/InputLabel'; import FormControl from '@mui/material/FormControl'; import ArrowDownwardIcon from '@mui/icons-material/ArrowDownward'; import ArrowUpwardIcon from '@mui/icons-material/ArrowUpward'; // No. of Footprints, pagination import Slider from '@mui/material/Slider'; import Pagination from '@mui/material/Pagination'; import Chip from '@mui/material/Chip'; import FlagIcon from '@mui/icons-material/Flag'; import { getMaxNumberPages, setCurrentPage, getCurrentPage, getNumberMatched, setLimit } from "../../js/ApiJsonCollection"; Loading Loading @@ -74,6 +77,13 @@ let css = { color: "#343a40", fontSize: 18, fontWeight: 600 }, chipHidden: { visibility: "hidden" }, chipShown: { visibility: "visible", textAlign: "center" } }; Loading Loading @@ -105,14 +115,19 @@ export default function SearchAndFilterInput(props) { const [maxNumberFootprints, setMaxNumberFootprints] = React.useState(10); const [limitVal, setLimitVal] = React.useState(10); const handleApply = (event) => { const [applyChipVisStyle, setApplyChipVisStyle] = React.useState(css.chipHidden); const [gotoPage, setGotopage] = React.useState("Apply to go to page 2"); const handleApply = () => { setTimeout(() => { setMaxPages(getMaxNumberPages); props.footprintNavClick(); }, 1000); setApplyChipVisStyle(css.chipHidden); } // Clear all values const handleClear = (event) => { const handleClear = () => { setSortVal(''); setSortAscCheckVal(false); setAreaCheckVal(false); Loading @@ -124,6 +139,8 @@ export default function SearchAndFilterInput(props) { setLimitVal(10); setMaxPages(getMaxNumberPages); setMaxNumberFootprints(getNumberMatched); setApplyChipVisStyle(css.chipShown); //// Uncomment to close details on clear // keywordDetails.current.open = false; // dateDetails.current.open = false; Loading Loading @@ -174,7 +191,8 @@ export default function SearchAndFilterInput(props) { const handleLimitChange = (event, value) => { setLimitVal(value); setLimit(value); props.footprintNavClick(); setGotopage("Apply to show " + value + " footprints"); setApplyChipVisStyle(css.chipShown); } // resets pagination and limit when switching targets Loading @@ -185,16 +203,15 @@ export default function SearchAndFilterInput(props) { setLimit(10); setMaxPages(getMaxNumberPages); props.footprintNavClick(); }, 1000); }, 2000); }, [props.target]); // Pagination const handlePageChange = (event, value) => { setCurrentPage(value); setTimeout(() => { props.footprintNavClick(); }, 1000) setGotopage("Apply to go to page " + value); setApplyChipVisStyle(css.chipShown); }; Loading Loading @@ -359,6 +376,16 @@ export default function SearchAndFilterInput(props) { /> </div> </div> <div style={applyChipVisStyle}> <Chip id="applyChip" label={gotoPage} icon={<FlagIcon/>} onClick={handleApply} variant="outlined" clickable /> </div> </div> </div> ); Loading app/src/js/AstroDrawControl.js +7 −0 Original line number Diff line number Diff line Loading @@ -72,6 +72,13 @@ export default L.Control.AstroDrawControl = L.Control.Draw.extend({ this.wktButton = L.DomUtil.get("wktButton"); L.DomEvent.on(this.wktButton, "click", this.mapWKTString, this); L.DomEvent.on( L.DomUtil.get("applyChip"), "click", this.applyFilter, this ); L.DomEvent.on( L.DomUtil.get("applyButton"), "click", Loading Loading
app/src/components/container/App.jsx +1 −5 Original line number Diff line number Diff line Loading @@ -56,15 +56,11 @@ export default function App() { const [footprintData, setFootprintData] = React.useState([]); const showHideSort = () => { console.log(showSidePanel + " -> ") console.log("Show/Hide"); setShowSidePanel(!showSidePanel); setSidePanelVisStyle(showSidePanel ? css.shown : css.hidden); console.log(" -> " + showSidePanel); } const handlePanelLayout = (event) => { console.log("Expand/Collapse"); setExpandResults(expandResults => !expandResults); setResultsExpandStyle(expandResults ? css.expanded : css.stacked); } Loading @@ -79,7 +75,7 @@ export default function App() { const handleFootprintClick = () => { setFootprintData(getFeatures); console.log(footprintData); //console.log(footprintData); }; return ( Loading
app/src/components/presentational/SearchAndFilterInput.jsx +57 −30 Original line number Diff line number Diff line Loading @@ -21,8 +21,11 @@ import InputLabel from '@mui/material/InputLabel'; import FormControl from '@mui/material/FormControl'; import ArrowDownwardIcon from '@mui/icons-material/ArrowDownward'; import ArrowUpwardIcon from '@mui/icons-material/ArrowUpward'; // No. of Footprints, pagination import Slider from '@mui/material/Slider'; import Pagination from '@mui/material/Pagination'; import Chip from '@mui/material/Chip'; import FlagIcon from '@mui/icons-material/Flag'; import { getMaxNumberPages, setCurrentPage, getCurrentPage, getNumberMatched, setLimit } from "../../js/ApiJsonCollection"; Loading Loading @@ -74,6 +77,13 @@ let css = { color: "#343a40", fontSize: 18, fontWeight: 600 }, chipHidden: { visibility: "hidden" }, chipShown: { visibility: "visible", textAlign: "center" } }; Loading Loading @@ -105,14 +115,19 @@ export default function SearchAndFilterInput(props) { const [maxNumberFootprints, setMaxNumberFootprints] = React.useState(10); const [limitVal, setLimitVal] = React.useState(10); const handleApply = (event) => { const [applyChipVisStyle, setApplyChipVisStyle] = React.useState(css.chipHidden); const [gotoPage, setGotopage] = React.useState("Apply to go to page 2"); const handleApply = () => { setTimeout(() => { setMaxPages(getMaxNumberPages); props.footprintNavClick(); }, 1000); setApplyChipVisStyle(css.chipHidden); } // Clear all values const handleClear = (event) => { const handleClear = () => { setSortVal(''); setSortAscCheckVal(false); setAreaCheckVal(false); Loading @@ -124,6 +139,8 @@ export default function SearchAndFilterInput(props) { setLimitVal(10); setMaxPages(getMaxNumberPages); setMaxNumberFootprints(getNumberMatched); setApplyChipVisStyle(css.chipShown); //// Uncomment to close details on clear // keywordDetails.current.open = false; // dateDetails.current.open = false; Loading Loading @@ -174,7 +191,8 @@ export default function SearchAndFilterInput(props) { const handleLimitChange = (event, value) => { setLimitVal(value); setLimit(value); props.footprintNavClick(); setGotopage("Apply to show " + value + " footprints"); setApplyChipVisStyle(css.chipShown); } // resets pagination and limit when switching targets Loading @@ -185,16 +203,15 @@ export default function SearchAndFilterInput(props) { setLimit(10); setMaxPages(getMaxNumberPages); props.footprintNavClick(); }, 1000); }, 2000); }, [props.target]); // Pagination const handlePageChange = (event, value) => { setCurrentPage(value); setTimeout(() => { props.footprintNavClick(); }, 1000) setGotopage("Apply to go to page " + value); setApplyChipVisStyle(css.chipShown); }; Loading Loading @@ -359,6 +376,16 @@ export default function SearchAndFilterInput(props) { /> </div> </div> <div style={applyChipVisStyle}> <Chip id="applyChip" label={gotoPage} icon={<FlagIcon/>} onClick={handleApply} variant="outlined" clickable /> </div> </div> </div> ); Loading
app/src/js/AstroDrawControl.js +7 −0 Original line number Diff line number Diff line Loading @@ -72,6 +72,13 @@ export default L.Control.AstroDrawControl = L.Control.Draw.extend({ this.wktButton = L.DomUtil.get("wktButton"); L.DomEvent.on(this.wktButton, "click", this.mapWKTString, this); L.DomEvent.on( L.DomUtil.get("applyChip"), "click", this.applyFilter, this ); L.DomEvent.on( L.DomUtil.get("applyButton"), "click", Loading