mirror of
https://github.com/bellingcat/ukraine-timemap.git
synced 2026-06-12 13:28:36 +03:00
fetchSelected -> updateSelected
This commit is contained in:
@@ -126,18 +126,14 @@ export function updateDomain(domain) {
|
||||
}
|
||||
|
||||
|
||||
export function fetchSelected(selected) {
|
||||
if (!selected || !selected.length || selected.length === 0) {
|
||||
return updateSelected([])
|
||||
}
|
||||
export function fetchSource(source) {
|
||||
return dispatch => {
|
||||
dispatch(updateSelected(selected))
|
||||
if (!SOURCES_URL) {
|
||||
dispatch(fetchSourceError('No source extension specified.'))
|
||||
} else {
|
||||
dispatch(toggleFetchingSources())
|
||||
|
||||
fetch(SOURCES_URL)
|
||||
fetch(`${SOURCES_URL}`)
|
||||
.then(response => {
|
||||
if (!response.ok) {
|
||||
throw new Error('No sources are available at the URL specified in the config specified.')
|
||||
|
||||
@@ -51,7 +51,7 @@ class Dashboard extends React.Component {
|
||||
let eventsToSelect = selected.map(event => this.getEventById(event.id));
|
||||
eventsToSelect = eventsToSelect.sort((a, b) => parseDate(a.timestamp) - parseDate(b.timestamp))
|
||||
|
||||
this.props.actions.fetchSelected(eventsToSelect)
|
||||
this.props.actions.updateSelected(eventsToSelect)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -106,7 +106,7 @@ const initial = {
|
||||
ui: {
|
||||
style: {
|
||||
categories: {
|
||||
default: 'red',
|
||||
default: 'yellow',
|
||||
// Add here other categories to differentiate by color, like:
|
||||
alpha: '#00ff00',
|
||||
beta: '#ff0000',
|
||||
@@ -115,17 +115,11 @@ const initial = {
|
||||
|
||||
narratives: {
|
||||
default: {
|
||||
style: 'dotted', // ['dotted', 'solid']
|
||||
opacity: 0.9, // range between 0 and 1
|
||||
stroke: 'red', // Any hex or rgb code
|
||||
style: 'solid', // ['dotted', 'solid']
|
||||
opacity: 0.5, // range between 0 and 1
|
||||
stroke: 'transparent', // Any hex or rgb code
|
||||
strokeWidth: 2
|
||||
},
|
||||
narrative_1: {
|
||||
style: 'solid', // ['dotted', 'solid']
|
||||
opacity: 0.4, // range between 0 and 1
|
||||
stroke: '#f18f01', // Any hex or rgb code
|
||||
strokeWidth: 2
|
||||
}
|
||||
}
|
||||
},
|
||||
dom: {
|
||||
|
||||
Reference in New Issue
Block a user