Browse Source

Fix arc focus from legend event - #652

pull/681/head
Masayuki Tanaka 10 years ago
parent
commit
a1370f4e41
  1. 4
      c3.js
  2. 2
      c3.min.js
  3. 2
      src/arc.js
  4. 2
      src/legend.js

4
c3.js

@ -3797,9 +3797,7 @@
})
.on('mouseout', function (id) {
$$.d3.select(this).classed(CLASS.legendItemFocused, false);
if (!$$.transiting) {
$$.api.revert();
}
if (config.legend_item_onmouseout) {
config.legend_item_onmouseout.call($$, id);
}
@ -4430,8 +4428,10 @@
interval = window.setInterval(function () {
if (!$$.transiting) {
window.clearInterval(interval);
if ($$.legend.selectAll('.c3-legend-item-focused').size() > 0) {
$$.expandArc(targetIds);
}
}
}, 10);
return;
}

2
c3.min.js vendored

File diff suppressed because one or more lines are too long

2
src/arc.js

@ -127,8 +127,10 @@ c3_chart_internal_fn.expandArc = function (targetIds) {
interval = window.setInterval(function () {
if (!$$.transiting) {
window.clearInterval(interval);
if ($$.legend.selectAll('.c3-legend-item-focused').size() > 0) {
$$.expandArc(targetIds);
}
}
}, 10);
return;
}

2
src/legend.js

@ -225,9 +225,7 @@ c3_chart_internal_fn.updateLegend = function (targetIds, options, transitions) {
})
.on('mouseout', function (id) {
$$.d3.select(this).classed(CLASS.legendItemFocused, false);
if (!$$.transiting) {
$$.api.revert();
}
if (config.legend_item_onmouseout) {
config.legend_item_onmouseout.call($$, id);
}

Loading…
Cancel
Save