Browse Source

Fix draggable for multiple xs

pull/990/head
Masayuki Tanaka 10 years ago
parent
commit
01162ca0af
  1. 10
      c3.js
  2. 8
      c3.min.js
  3. 10
      src/interaction.js

10
c3.js

@ -2514,10 +2514,12 @@
} }
}) })
.call( .call(
d3.behavior.drag().origin(Object) config.data_selection_draggable && $$.drag ? (
.on('drag', function () { $$.drag(d3.mouse(this)); }) d3.behavior.drag().origin(Object)
.on('dragstart', function () { $$.dragstart(d3.mouse(this)); }) .on('drag', function () { $$.drag(d3.mouse(this)); })
.on('dragend', function () { $$.dragend(); }) .on('dragstart', function () { $$.dragstart(d3.mouse(this)); })
.on('dragend', function () { $$.dragend(); })
) : function () {}
); );
}; };
c3_chart_internal_fn.dispatchEvent = function (type, index, mouse) { c3_chart_internal_fn.dispatchEvent = function (type, index, mouse) {

8
c3.min.js vendored

File diff suppressed because one or more lines are too long

10
src/interaction.js

@ -333,10 +333,12 @@ c3_chart_internal_fn.generateEventRectsForMultipleXs = function (eventRectEnter)
} }
}) })
.call( .call(
d3.behavior.drag().origin(Object) config.data_selection_draggable && $$.drag ? (
.on('drag', function () { $$.drag(d3.mouse(this)); }) d3.behavior.drag().origin(Object)
.on('dragstart', function () { $$.dragstart(d3.mouse(this)); }) .on('drag', function () { $$.drag(d3.mouse(this)); })
.on('dragend', function () { $$.dragend(); }) .on('dragstart', function () { $$.dragstart(d3.mouse(this)); })
.on('dragend', function () { $$.dragend(); })
) : function () {}
); );
}; };
c3_chart_internal_fn.dispatchEvent = function (type, index, mouse) { c3_chart_internal_fn.dispatchEvent = function (type, index, mouse) {

Loading…
Cancel
Save