mirror of
https://github.com/bellingcat/ukraine-timemap.git
synced 2026-06-13 05:48:36 +03:00
clean handler semantics in Dashboard.jsx (further)
This commit is contained in:
@@ -22,7 +22,6 @@ class CardStack extends React.Component {
|
||||
event={event}
|
||||
language={this.props.language}
|
||||
tools={this.props.tools}
|
||||
// isLoading={this.props.isLoading}
|
||||
getNarrativeLinks={this.props.getNarrativeLinks}
|
||||
getCategoryGroup={this.props.getCategoryGroup}
|
||||
getCategoryColor={this.props.getCategoryColor}
|
||||
|
||||
@@ -94,8 +94,8 @@ class Dashboard extends React.Component {
|
||||
<div>
|
||||
<Viewport
|
||||
methods={{
|
||||
select: this.handleSelect,
|
||||
highlight: this.handleHighlight,
|
||||
onSelect: this.handleSelect,
|
||||
// onHighlight: this.handleHighlight,
|
||||
getCategoryColor: category => this.getCategoryColor(category)
|
||||
}}
|
||||
/>
|
||||
@@ -111,9 +111,11 @@ class Dashboard extends React.Component {
|
||||
getCategoryColor={category => this.getCategoryColor(category)}
|
||||
/>
|
||||
<Timeline
|
||||
onSelect={this.handleSelect}
|
||||
onUpdateTimerange={this.updateTimerange}
|
||||
getCategoryColor={category => this.getCategoryColor(category)}
|
||||
methods={{
|
||||
onSelect: this.handleSelect,
|
||||
onUpdateTimerange: this.updateTimerange,
|
||||
getCategoryColor: category => this.getCategoryColor(category)
|
||||
}}
|
||||
/>
|
||||
<InfoPopUp
|
||||
ui={this.props.ui}
|
||||
|
||||
@@ -19,13 +19,7 @@ class Timeline extends React.Component {
|
||||
dom: this.props.dom
|
||||
}
|
||||
|
||||
const methods = {
|
||||
onSelect: this.props.onSelect,
|
||||
onUpdateTimerange: this.props.onUpdateTimerange,
|
||||
getCategoryColor: this.props.getCategoryColor
|
||||
}
|
||||
|
||||
this.timeline = new TimelineLogic(this.props.app, ui, methods);
|
||||
this.timeline = new TimelineLogic(this.props.app, ui, this.props.methods);
|
||||
this.timeline.update(this.props.domain, this.props.app);
|
||||
this.timeline.render(this.props.domain);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user