Skip to content

Commit

Permalink
Fire events last
Browse files Browse the repository at this point in the history
  • Loading branch information
johnwalley committed Jan 4, 2018
1 parent 584b24d commit 9fea78f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "d3-bumps-chart",
"version": "0.10.0",
"version": "0.10.1",
"description": "Draw bumps charts",
"keywords": ["d3", "d3-module", "bumps"],
"homepage": "https://github.com/johnwalley/d3-bumps-chart/",
Expand Down
10 changes: 3 additions & 7 deletions src/chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -273,30 +273,26 @@ export default function() {
}

function selectYear(start, end) {
listeners.call('selectYear', chart, start, end);
yearRange = { start: start, end: end };
render();
listeners.call('selectYear', chart, start, end);
}

function toggleSelectedCrew(name) {
listeners.call('toggleSelectedCrew', chart, name);

if (selectedCrews.has(name)) {
selectedCrews.delete(name);
} else {
selectedCrews.add(name);
}

render();
listeners.call('toggleSelectedCrew', chart, name);
}

function highlightCrew(name) {
if (name !== null) {
listeners.call('highlightCrew', chart, name);
}

highlightedCrew = name;
render();
listeners.call('toggleSelectedCrew', chart, name);
}

function createKey(set, gender, postfix = '') {
Expand Down

0 comments on commit 9fea78f

Please sign in to comment.