diff --git a/package.json b/package.json index 1bdfc76..c182df6 100644 --- a/package.json +++ b/package.json @@ -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/", diff --git a/src/chart.js b/src/chart.js index 28f0ef2..d48d8dd 100644 --- a/src/chart.js +++ b/src/chart.js @@ -273,14 +273,12 @@ 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 { @@ -288,15 +286,13 @@ export default function() { } 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 = '') {