Browse Source

Remove data.ondragstart and data.ondragend callbacks - #215 #798

pull/938/head
Masayuki Tanaka 10 years ago
parent
commit
7bb7cb998d
  1. 5
      c3.js
  2. 8
      c3.min.js
  3. 2
      src/config.js
  4. 3
      src/drag.js

5
c3.js

@ -978,8 +978,6 @@
data_onmouseout: function () {},
data_onselected: function () {},
data_onunselected: function () {},
data_ondragstart: function () {},
data_ondragend: function () {},
data_url: undefined,
data_json: undefined,
data_rows: undefined,
@ -5033,7 +5031,6 @@
.attr('class', CLASS.dragarea)
.style('opacity', 0.1);
$$.dragging = true;
$$.config.data_ondragstart.call($$.api);
};
c3_chart_internal_fn.dragend = function () {
@ -5047,10 +5044,8 @@
$$.main.selectAll('.' + CLASS.shape)
.classed(CLASS.INCLUDED, false);
$$.dragging = false;
$$.config.data_ondragend.call($$.api);
};
c3_chart_internal_fn.selectPoint = function (target, d, i) {
var $$ = this, config = $$.config,
cx = (config.axis_rotated ? $$.circleY : $$.circleX).bind($$),

8
c3.min.js vendored

File diff suppressed because one or more lines are too long

2
src/config.js

@ -50,8 +50,6 @@ c3_chart_internal_fn.getDefaultConfig = function () {
data_onmouseout: function () {},
data_onselected: function () {},
data_onunselected: function () {},
data_ondragstart: function () {},
data_ondragend: function () {},
data_url: undefined,
data_json: undefined,
data_rows: undefined,

3
src/drag.js

@ -65,7 +65,6 @@ c3_chart_internal_fn.dragstart = function (mouse) {
.attr('class', CLASS.dragarea)
.style('opacity', 0.1);
$$.dragging = true;
$$.config.data_ondragstart.call($$.api);
};
c3_chart_internal_fn.dragend = function () {
@ -79,6 +78,4 @@ c3_chart_internal_fn.dragend = function () {
$$.main.selectAll('.' + CLASS.shape)
.classed(CLASS.INCLUDED, false);
$$.dragging = false;
$$.config.data_ondragend.call($$.api);
};

Loading…
Cancel
Save