Skip to content

Commit

Permalink
Merge branch 'dev' of https://github.com/episphere/epitracker into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Sahar-behpour committed Nov 4, 2024
2 parents cb212b2 + 4733b15 commit ef94445
Show file tree
Hide file tree
Showing 17 changed files with 1,014 additions and 687 deletions.
Binary file modified data/quantile/quantile_data_2018-2022_ref-2022_q10.csv.zip
Binary file not shown.
Binary file modified data/quantile/quantile_data_2018-2022_ref-2022_q3.csv.zip
Binary file not shown.
Binary file modified data/quantile/quantile_data_2018-2022_ref-2022_q4.csv.zip
Binary file not shown.
Binary file modified data/quantile/quantile_data_2018-2022_ref-2022_q5.csv.zip
Binary file not shown.
33 changes: 16 additions & 17 deletions src/pages/mapPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import choices from "https://cdn.jsdelivr.net/npm/[email protected]/+esm";

import { EpiTrackerData } from "../utils/EpiTrackerData.js"
import { State } from '../utils/State.js';
import { addPopperTooltip, addTippys, colorRampLegendPivot, createOptionSorter, scaleGradient, popup, plotDataTable, createDropdownButton } from '../utils/helper.js';
import { addPopperTooltip, addTippys, colorRampLegendPivot, createOptionSorter, scaleGradient, popup, plotDataTable, createDropdownButton, minorPopup } from '../utils/helper.js';
import { hookCheckbox, hookSelectChoices } from '../utils/input2.js';
import { createChoroplethPlot } from '../plots/mapPlots.js';
import { toggleLoading } from '../utils/download.js';
Expand Down Expand Up @@ -301,18 +301,19 @@ class MapApplication {
}

addColorSettingsPopup() {
const colorSettingsTooltip = addPopperTooltip(this.elems.innerDashboard);

let tooltipShown = false;
this.elems.buttonColorSettings.addEventListener("click", () => {
this.elems.colorSettings.style.display = "flex";
if (tooltipShown) {
colorSettingsTooltip.hide();
} else {
colorSettingsTooltip.show(this.elems.buttonColorSettings, this.elems.colorSettings);
}
tooltipShown = !tooltipShown;
})
// const colorSettingsTooltip = addPopperTooltip(this.elems.innerDashboard);

// let tooltipShown = false;
// this.elems.buttonColorSettings.addEventListener("click", () => {
// this.elems.colorSettings.style.display = "flex";
// if (tooltipShown) {
// colorSettingsTooltip.hide();
// } else {
// colorSettingsTooltip.show(this.elems.buttonColorSettings, this.elems.colorSettings);
// }
// tooltipShown = !tooltipShown;
// })

// Add color scheme gradients
this.state.schemeOptions = Object.entries(formatName("colorSchemes")).map(
Expand All @@ -327,11 +328,6 @@ class MapApplication {
return { value: k, label: div.outerHTML };
});

this.elems.buttonColorSettingsClose.addEventListener("click", () => {
tooltipShown = false;
colorSettingsTooltip.hide()
});

const outlierCutoffRange = document.getElementById("outlier-cutoff-range");
const outlierCutoffRangeText = document.getElementById(
"outlier-cutoff-range-text"
Expand All @@ -342,6 +338,9 @@ class MapApplication {
});
outlierCutoffRange.value = this.state.outlierCutoff;
outlierCutoffRangeText.innerText = "±" + this.state.outlierCutoff + "σ";

minorPopup(this.elems.innerDashboard, this.elems.buttonColorSettings, this.elems.colorSettings, "Color Settings");

}

async createMapTooltip() {
Expand Down
Loading

0 comments on commit ef94445

Please sign in to comment.