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(
d3.behavior.drag().origin(Object)
.on('drag', function () { $$.drag(d3.mouse(this)); })
.on('dragstart', function () { $$.dragstart(d3.mouse(this)); })
.on('dragend', function () { $$.dragend(); })
config.data_selection_draggable && $$.drag ? (
d3.behavior.drag().origin(Object)
.on('drag', function () { $$.drag(d3.mouse(this)); })
.on('dragstart', function () { $$.dragstart(d3.mouse(this)); })
.on('dragend', function () { $$.dragend(); })
) : function () {}
);
};
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(
d3.behavior.drag().origin(Object)
.on('drag', function () { $$.drag(d3.mouse(this)); })
.on('dragstart', function () { $$.dragstart(d3.mouse(this)); })
.on('dragend', function () { $$.dragend(); })
config.data_selection_draggable && $$.drag ? (
d3.behavior.drag().origin(Object)
.on('drag', function () { $$.drag(d3.mouse(this)); })
.on('dragstart', function () { $$.dragstart(d3.mouse(this)); })
.on('dragend', function () { $$.dragend(); })
) : function () {}
);
};
c3_chart_internal_fn.dispatchEvent = function (type, index, mouse) {

Loading…
Cancel
Save