-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #714 from cmu-delphi/release-v1.12.3
release v1.12.3
- Loading branch information
Showing
37 changed files
with
4,761 additions
and
4,703 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
<script> | ||
import MapBox from './MapBox/MapBox.svelte'; | ||
import { | ||
currentSensor, | ||
currentLevel, | ||
encoding, | ||
colorScale, | ||
colorStops, | ||
bubbleRadiusScale, | ||
spikeHeightScale, | ||
currentRegion, | ||
signalCasesOrDeathOptions, | ||
currentSensorMapTitle, | ||
} from '../stores'; | ||
import { createEventDispatcher } from 'svelte'; | ||
import USMapBoxWrapper from './MapBox/USMapBoxWrapper'; | ||
import MapOverlays from './MapOverlays.svelte'; | ||
const dispatch = createEventDispatcher(); | ||
/** | ||
* @type {MapBox} | ||
*/ | ||
let map; | ||
let zoom = 1.0; | ||
export let mapLoading = false; | ||
export let legendLoading = false; | ||
export let summary = null; | ||
export let showDate = false; | ||
export let data; | ||
/** | ||
* @type {{info: import('../../maps/nameIdInfo').NameInfo, color: string}[]} | ||
*/ | ||
export let selections = []; | ||
/** | ||
* @type {import('../../maps').NameInfo | null} | ||
*/ | ||
export let focusOn = null; | ||
export let selectRandomOnReady = false; | ||
function updatedEncoding(info) { | ||
if (!info) { | ||
return; | ||
} | ||
if (info.scale) { | ||
colorScale.set(info.scale); | ||
} | ||
colorStops.set(info.stops); | ||
if ($encoding === 'bubble' && info.custom) { | ||
bubbleRadiusScale.set(info.custom); | ||
} | ||
if ($encoding === 'spike' && info.custom) { | ||
spikeHeightScale.set(info.custom); | ||
} | ||
} | ||
function initialReady() { | ||
if (!$currentRegion && selectRandomOnReady) { | ||
map.selectRandom(); | ||
} | ||
} | ||
</script> | ||
|
||
<MapOverlays {map} {mapLoading} {legendLoading} {zoom} {summary} {showDate} /> | ||
<MapBox | ||
bind:this={map} | ||
{data} | ||
sensor={$currentSensor} | ||
level={$currentLevel} | ||
signalOptions={$signalCasesOrDeathOptions} | ||
{selections} | ||
{focusOn} | ||
encoding={$encoding} | ||
on:zoom={(e) => (zoom = e.detail)} | ||
on:updatedEncoding={(e) => updatedEncoding(e.detail)} | ||
on:loading={(e) => dispatch('loading', e.detail)} | ||
on:select={(e) => dispatch('select', e.detail)} | ||
on:ready={initialReady} | ||
wrapperClass={USMapBoxWrapper} | ||
title={$currentSensorMapTitle} /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.