mirror of
https://github.com/bellingcat/ukraine-timemap.git
synced 2026-06-11 21:08:36 +03:00
rename variables
This commit is contained in:
@@ -172,7 +172,7 @@ class Card extends React.Component {
|
||||
className={`event-card ${isSelected ? 'selected' : ''}`}
|
||||
id={`event-card-${idx}`}
|
||||
ref={this.props.innerRef}
|
||||
onClick={(e) => { this.props.onClick(idx) }}
|
||||
onClick={this.props.onClick}
|
||||
>
|
||||
{this.renderMain()}
|
||||
{this.state.isOpen ? this.renderExtra() : null}
|
||||
|
||||
@@ -61,7 +61,6 @@ class CardStack extends React.Component {
|
||||
this.refs[idx] = thisRef
|
||||
return (<Card
|
||||
event={event}
|
||||
idx={idx}
|
||||
ref={thisRef}
|
||||
sourceError={this.props.sourceError}
|
||||
language={this.props.language}
|
||||
@@ -75,7 +74,7 @@ class CardStack extends React.Component {
|
||||
onHighlight={this.props.onHighlight}
|
||||
onSelect={this.props.onSelect}
|
||||
features={this.props.features}
|
||||
onClick={this.props.onSelectNarrativeEvent}
|
||||
onClick={() => this.props.onSelectNarrativeStep(idx)}
|
||||
/>)
|
||||
})
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ class Dashboard extends React.Component {
|
||||
this.getCategoryColor = this.getCategoryColor.bind(this)
|
||||
this.findEventIdx = this.findEventIdx.bind(this)
|
||||
this.onKeyDown = this.onKeyDown.bind(this)
|
||||
this.selectNarrativeEvent = this.selectNarrativeEvent.bind(this)
|
||||
this.selectNarrativeStep = this.selectNarrativeStep.bind(this)
|
||||
}
|
||||
|
||||
componentDidMount () {
|
||||
@@ -182,15 +182,15 @@ class Dashboard extends React.Component {
|
||||
|
||||
if (amt === 1) {
|
||||
const idx = current + 1
|
||||
this.selectNarrativeEvent(idx)
|
||||
this.selectNarrativeStep(idx)
|
||||
}
|
||||
if (amt === -1) {
|
||||
const idx = current - 1
|
||||
this.selectNarrativeEvent(idx)
|
||||
this.selectNarrativeStep(idx)
|
||||
}
|
||||
}
|
||||
|
||||
selectNarrativeEvent (idx) {
|
||||
selectNarrativeStep (idx) {
|
||||
const { narrative } = this.props.app
|
||||
if (narrative === null) return
|
||||
|
||||
@@ -276,7 +276,7 @@ class Dashboard extends React.Component {
|
||||
onSelect: ev => this.handleSelect(ev, 1),
|
||||
onSelectNarrative: this.setNarrative,
|
||||
getCategoryColor: this.getCategoryColor,
|
||||
onSelectNarrativeEvent: this.selectNarrativeEvent
|
||||
onSelectNarrativeStep: this.selectNarrativeStep
|
||||
}}
|
||||
/>
|
||||
<Timeline
|
||||
@@ -295,7 +295,7 @@ class Dashboard extends React.Component {
|
||||
onToggleCardstack={() => actions.updateSelected([])}
|
||||
getNarrativeLinks={event => this.getNarrativeLinks(event)}
|
||||
getCategoryColor={this.getCategoryColor}
|
||||
onSelectNarrativeEvent={this.selectNarrativeEvent}
|
||||
onSelectNarrativeStep={this.selectNarrativeStep}
|
||||
/>
|
||||
<StateOptions
|
||||
showing={features.FILTERS_AS_NARRATIVES && !app.narrative && app.filters.filters.length > 0}
|
||||
|
||||
@@ -214,7 +214,7 @@ class Map extends React.Component {
|
||||
selected={this.props.app.selected}
|
||||
narrative={this.props.app.narrative}
|
||||
onSelect={this.props.methods.onSelect}
|
||||
onSelectNarrative={this.props.methods.onSelectNarrativeEvent}
|
||||
onSelectNarrative={this.props.methods.onSelectNarrativeStep}
|
||||
getCategoryColor={this.props.methods.getCategoryColor}
|
||||
eventRadius={this.props.ui.eventRadius}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user