mirror of
https://github.com/bellingcat/ukraine-timemap.git
synced 2026-06-12 05:18:34 +03:00
give timeline constructor a 'methods' arg
This commit is contained in:
@@ -44,6 +44,7 @@ class Dashboard extends React.Component {
|
||||
}
|
||||
|
||||
handleSelect(selected) {
|
||||
console.log(selected)
|
||||
if (selected) {
|
||||
let eventsToSelect = selected.map(event => this.getEventById(event.id));
|
||||
const parser = this.props.ui.tools.parser;
|
||||
|
||||
@@ -22,15 +22,18 @@ class Timeline extends React.Component {
|
||||
selected: this.props.selected,
|
||||
language: this.props.language,
|
||||
select: this.props.select,
|
||||
filter: this.props.filter,
|
||||
getCategoryColor: this.props.getCategoryColor
|
||||
}
|
||||
const ui = {
|
||||
tools: this.props.tools,
|
||||
dom: this.props.dom
|
||||
}
|
||||
|
||||
this.timeline = new TimelineLogic(app, ui);
|
||||
const methods = {
|
||||
filter: this.props.filter,
|
||||
getCategoryColor: this.props.getCategoryColor
|
||||
}
|
||||
|
||||
this.timeline = new TimelineLogic(app, ui, methods);
|
||||
this.timeline.update(domain, app);
|
||||
this.timeline.render(domain);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user