rename other timeline handlers

This commit is contained in:
Lachlan Kermode
2018-12-04 12:26:23 +00:00
parent 90e6d9ded1
commit ebb37a845a
3 changed files with 6 additions and 6 deletions

View File

@@ -133,10 +133,10 @@ class Dashboard extends React.Component {
getCategoryColor={category => this.getCategoryColor(category)}
/>
<Timeline
select={this.handleSelect}
onSelect={this.handleSelect}
onUpdateTimerange={this.updateTimerange}
highlight={this.handleHighlight}
toggle={() => this.handleToggle('TOGGLE_CARDSTACK')}
// onHighlight={this.handleHighlight}
// onToggle={() => this.handleToggle('TOGGLE_CARDSTACK')}
getCategoryColor={category => this.getCategoryColor(category)}
/>
<InfoPopUp

View File

@@ -20,7 +20,7 @@ class Timeline extends React.Component {
}
const methods = {
select: this.props.select,
onSelect: this.props.onSelect,
onUpdateTimerange: this.props.onUpdateTimerange,
getCategoryColor: this.props.getCategoryColor
}

View File

@@ -325,7 +325,7 @@ export default function(app, ui, methods) {
* @param {String} direction: 'forward' / 'backwards'
*/
function moveTime(direction) {
methods.select();
methods.onSelect();
const extent = getTimeScaleExtent();
const newCentralTime = d3.timeMinute.offset(scale.x.domain()[0], extent / 2);
@@ -438,7 +438,7 @@ export default function(app, ui, methods) {
.attr('cy', eventPoint => getEventY(eventPoint))
.style('fill', eventPoint => getEventPointFillColor(eventPoint))
.on('click', eventPoint => {
return methods.select(getAllEventsAtOnce(eventPoint))
return methods.onSelect(getAllEventsAtOnce(eventPoint))
})
.on('mouseover', handleMouseOver)
.on('mouseout', handleMouseOut)