Skip to content

Commit

Permalink
nih
Browse files Browse the repository at this point in the history
  • Loading branch information
trevlenb2 committed Oct 17, 2023
1 parent 237e131 commit 38e087b
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 6 deletions.
9 changes: 9 additions & 0 deletions src/features/planSimulation/components/Simulation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -908,6 +908,7 @@ const Simulation = () => {

const clearHandler = () => {
setSelectedEntityConditionList([]);
setAnalysisLayerDetails([]);
setShowResult(false);
setMapData(undefined);
setToLocation(undefined);
Expand All @@ -916,6 +917,14 @@ const Simulation = () => {
setParentsLoadingState('notstarted');
setResultsLoadingState('notstarted');
setSelectedFilterGeographicLevelList([]);
setSelectedHierarchy(undefined);
setSelectedLocation(undefined);
setLocationList([]);
setHighestLocations(undefined);
setInactiveGeoFilterList([]);
setSelectedFilterInactiveGeographicLevelList(undefined);
setStatsLayerMetadata({});
setAnalysisResultEntityTags(undefined);
levelsLoaded.current = [];
setGeoFilterList([]);
reset();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1580,7 +1580,7 @@ const SimulationMapView = ({
</Draggable>
)}

{showUserDefinedSettingsPanel && selectedUserDefinedLayer && (
{showUserDefinedSettingsPanel && analysisLayerDetails.length > 0 && selectedUserDefinedLayer && (
<div style={{ float: 'left' }} className="sidebar-adjust-list text-dark bg-light p-2 rounded">
<p className="lead mb-1">Settings - {selectedUserDefinedLayer.key}</p>

Expand Down Expand Up @@ -1795,7 +1795,7 @@ const SimulationMapView = ({
}}
className="mb-2 float-end"
>
Full Screen
{fullScreen ? 'Show Controls' : 'Full Screen'}
</Button>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,17 @@ const SimulationAnalysisPanelContent = ({ formControls }: Props<any>) => {
let stacks = [];
for (let i = 0; i < 6; i++) {
let colors = [];
let skipFirst = false;
for (let j = i * 60; j <= i * 60 + 60; j = j + 6) {
let hexValue = hsl.hex([j, 100, 50]);
if (skipFirst) {
let hexValue = hsl.hex([j, 100, 50]);

let rgbArr = hex.rgb(hexValue);
let hsvArr = hex.hsv(hexValue);
let rgbArr = hex.rgb(hexValue);
let hsvArr = hex.hsv(hexValue);

colors.push({ colr: j, hex: hexValue, rgb: rgbArr, hsv: hsvArr });
colors.push({ colr: j, hex: hexValue, rgb: rgbArr, hsv: hsvArr });
}
skipFirst = true;
}
stacks.push({ stack: i, col: colors });
}
Expand Down

0 comments on commit 38e087b

Please sign in to comment.