Browse Source

Add chart.api ($$.api) to 'onunselected' callback

It should behave as the 'onselected' callback.
pull/1147/head
lbortoli 10 years ago
parent
commit
1b6d2c2895
  1. 2
      src/selection.js

2
src/selection.js

@ -18,7 +18,7 @@ c3_chart_internal_fn.selectPoint = function (target, d, i) {
}; };
c3_chart_internal_fn.unselectPoint = function (target, d, i) { c3_chart_internal_fn.unselectPoint = function (target, d, i) {
var $$ = this; var $$ = this;
$$.config.data_onunselected(d, target.node()); $$.config.data_onunselected.call($$.api, d, target.node());
// remove selected-circle from low layer g // remove selected-circle from low layer g
$$.main.select('.' + CLASS.selectedCircles + $$.getTargetSelectorSuffix(d.id)).selectAll('.' + CLASS.selectedCircle + '-' + i) $$.main.select('.' + CLASS.selectedCircles + $$.getTargetSelectorSuffix(d.id)).selectAll('.' + CLASS.selectedCircle + '-' + i)
.transition().duration(100).attr('r', 0) .transition().duration(100).attr('r', 0)

Loading…
Cancel
Save