give timeline constructor a 'methods' arg

This commit is contained in:
Lachlan Kermode
2018-12-04 11:21:31 +00:00
parent b1fd81f772
commit a47fbd95e2
3 changed files with 12 additions and 12 deletions

View File

@@ -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;

View File

@@ -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);
}