Commit 1b6d2c28 authored by lbortoli's avatar lbortoli

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

It should behave as the 'onselected' callback.
parent 4eb2dd13
...@@ -18,7 +18,7 @@ c3_chart_internal_fn.selectPoint = function (target, d, i) { ...@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment