Browse Source

issue-1038: remove unused arg

pull/1420/head
Irina Abramova 9 years ago
parent
commit
6bf811b415
  1. 10
      src/selection.js

10
src/selection.js

@ -1,4 +1,4 @@
c3_chart_internal_fn.selectPoint = function (target, d, i) { c3_chart_internal_fn.selectPoint = function (target, d) {
var $$ = this, config = $$.config, var $$ = this, config = $$.config,
cx = (config.axis_rotated ? $$.circleY : $$.circleX).bind($$), cx = (config.axis_rotated ? $$.circleY : $$.circleX).bind($$),
cy = (config.axis_rotated ? $$.circleX : $$.circleY).bind($$), cy = (config.axis_rotated ? $$.circleX : $$.circleY).bind($$),
@ -8,7 +8,7 @@ c3_chart_internal_fn.selectPoint = function (target, d, i) {
$$.main.select('.' + CLASS.selectedCircles + $$.getTargetSelectorSuffix(d.id)).selectAll('.' + CLASS.selectedCircle + '-' + d.index) $$.main.select('.' + CLASS.selectedCircles + $$.getTargetSelectorSuffix(d.id)).selectAll('.' + CLASS.selectedCircle + '-' + d.index)
.data([d]) .data([d])
.enter().append('circle') .enter().append('circle')
.attr("class", function () { return $$.generateClass(CLASS.selectedCircle, i); }) .attr("class", function () { return $$.generateClass(CLASS.selectedCircle, d.index); })
.attr("cx", cx) .attr("cx", cx)
.attr("cy", function(d){return cy(d, d.index);}) .attr("cy", function(d){return cy(d, d.index);})
.attr("stroke", function () { return $$.color(d); }) .attr("stroke", function () { return $$.color(d); })
@ -16,7 +16,7 @@ c3_chart_internal_fn.selectPoint = function (target, d, i) {
.transition().duration(100) .transition().duration(100)
.attr("r", r); .attr("r", r);
}; };
c3_chart_internal_fn.unselectPoint = function (target, d, i) { c3_chart_internal_fn.unselectPoint = function (target, d) {
var $$ = this; var $$ = this;
$$.config.data_onunselected.call($$.api, 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
@ -24,8 +24,8 @@ c3_chart_internal_fn.unselectPoint = function (target, d, i) {
.transition().duration(100).attr('r', 0) .transition().duration(100).attr('r', 0)
.remove(); .remove();
}; };
c3_chart_internal_fn.togglePoint = function (selected, target, d, i) { c3_chart_internal_fn.togglePoint = function (selected, target, d) {
selected ? this.selectPoint(target, d, i) : this.unselectPoint(target, d, i); selected ? this.selectPoint(target, d) : this.unselectPoint(target, d);
}; };
c3_chart_internal_fn.selectPath = function (target, d) { c3_chart_internal_fn.selectPath = function (target, d) {
var $$ = this; var $$ = this;

Loading…
Cancel
Save