mirror of
https://github.com/bellingcat/ukraine-timemap.git
synced 2026-06-12 13:28:36 +03:00
added and changed var names
This commit is contained in:
@@ -246,10 +246,10 @@ export function updateNarrative (narrative) {
|
||||
}
|
||||
}
|
||||
|
||||
export const SELECT_NARRATIVE_IDX = 'SELECT_NARRATIVE_IDX'
|
||||
export const UPDATE_NARRATIVE_STEP_IDX = 'UPDATE_NARRATIVE_STEP_IDX'
|
||||
export function selectNarrativeIdx (idx) {
|
||||
return {
|
||||
type: SELECT_NARRATIVE_IDX,
|
||||
type: UPDATE_NARRATIVE_STEP_IDX,
|
||||
idx
|
||||
}
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ function MapEvents ({
|
||||
// in narrative mode, only render events in narrative
|
||||
// TODO: move this to a selector
|
||||
// Gets around if block scope
|
||||
var narrativeIdx = false
|
||||
let narrativeIdx = -1
|
||||
|
||||
if (narrative) {
|
||||
const { steps } = narrative
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
UPDATE_TIMERANGE,
|
||||
UPDATE_DIMENSIONS,
|
||||
UPDATE_NARRATIVE,
|
||||
SELECT_NARRATIVE_IDX,
|
||||
UPDATE_NARRATIVE_STEP_IDX,
|
||||
UPDATE_SOURCE,
|
||||
TOGGLE_LANGUAGE,
|
||||
TOGGLE_SITES,
|
||||
@@ -97,7 +97,7 @@ function updateNarrative (appState, action) {
|
||||
}
|
||||
}
|
||||
|
||||
function selectNarrativeIdx (appState, action) {
|
||||
function updateNarrativeStepIdx (appState, action) {
|
||||
appState.narrativeState.current = action.idx
|
||||
|
||||
return {
|
||||
@@ -233,8 +233,8 @@ function app (appState = initial.app, action) {
|
||||
return updateDimensions(appState, action)
|
||||
case UPDATE_NARRATIVE:
|
||||
return updateNarrative(appState, action)
|
||||
case SELECT_NARRATIVE_IDX:
|
||||
return selectNarrativeIdx(appState, action)
|
||||
case UPDATE_NARRATIVE_STEP_IDX:
|
||||
return updateNarrativeStepIdx(appState, action)
|
||||
case UPDATE_SOURCE:
|
||||
return updateSource(appState, action)
|
||||
/* toggles */
|
||||
|
||||
Reference in New Issue
Block a user