From 80931ff6a4a7200c8478722e01b11f9e94e5a091 Mon Sep 17 00:00:00 2001 From: Logach Date: Tue, 25 Mar 2014 23:12:31 +0400 Subject: [PATCH] Fix bug with mouse[over|leave]. Read more https://github.com/masayuki0812/c3/issues/90 --- c3.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/c3.js b/c3.js index 366cf65..cae126f 100644 --- a/c3.js +++ b/c3.js @@ -3046,6 +3046,7 @@ /*-- Draw Legend --*/ function focusLegend(id) { + if(!__legend_show) { return; } var legendItem = legend.selectAll('.legend-item'), isTarget = function (d) { return !id || d === id; }, notTarget = function (d) { return !isTarget(d); }; @@ -3053,6 +3054,7 @@ legendItem.filter(isTarget).transition().duration(100).style('opacity', 1); } function defocusLegend(id) { + if(!__legend_show) { return; } var legendItem = legend.selectAll('.legend-item'), isTarget = function (d) { return !id || d === id; }, notTarget = function (d) { return !isTarget(d); }; @@ -3060,6 +3062,7 @@ legendItem.filter(isTarget).transition().duration(100).style('opacity', 0.3); } function revertLegend() { + if(!__legend_show) { return; } legend.selectAll('.legend-item') .transition().duration(100) .style('opacity', 1);