From 2edfbb5d1977aa3c5803c7476dc8806a8bec522d Mon Sep 17 00:00:00 2001 From: Lachlan Kermode Date: Tue, 4 Dec 2018 11:28:31 +0000 Subject: [PATCH] move select to methods arg in timeline --- src/components/Timeline.jsx | 2 +- src/js/timeline/timeline.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/Timeline.jsx b/src/components/Timeline.jsx index 7451109..c5dc886 100644 --- a/src/components/Timeline.jsx +++ b/src/components/Timeline.jsx @@ -24,7 +24,6 @@ class Timeline extends React.Component { timerange: this.props.timerange, selected: this.props.selected, language: this.props.language, - select: this.props.select, } const ui = { tools: this.props.tools, @@ -32,6 +31,7 @@ class Timeline extends React.Component { } const methods = { + select: this.props.select, filter: this.props.filter, getCategoryColor: this.props.getCategoryColor } diff --git a/src/js/timeline/timeline.js b/src/js/timeline/timeline.js index 82340ce..3240bce 100644 --- a/src/js/timeline/timeline.js +++ b/src/js/timeline/timeline.js @@ -326,7 +326,7 @@ export default function(app, ui, methods) { * @param {String} direction: 'forward' / 'backwards' */ function moveTime(direction) { - app.select(); + methods.select(); const extent = getTimeScaleExtent(); const newCentralTime = d3.timeMinute.offset(scale.x.domain()[0], extent / 2); @@ -439,7 +439,7 @@ export default function(app, ui, methods) { .attr('cy', eventPoint => getEventY(eventPoint)) .style('fill', eventPoint => getEventPointFillColor(eventPoint)) .on('click', eventPoint => { - return app.select(getAllEventsAtOnce(eventPoint)) + return methods.select(getAllEventsAtOnce(eventPoint)) }) .on('mouseover', handleMouseOver) .on('mouseout', handleMouseOut)