Browse Source

replaced drag selection XOR with more reasonable behavior.

pull/1582/head
Andy Dufilie 9 years ago
parent
commit
ee6bfc7540
  1. 8
      src/drag.js

8
src/drag.js

@ -47,11 +47,11 @@ c3_chart_internal_fn.drag = function (mouse) {
// line/area selection not supported yet
return;
}
if (isWithin ^ isIncluded) {
shape.classed(CLASS.INCLUDED, !isIncluded);
if (isWithin ^ isSelected || isWithin ^ isIncluded) {
shape.classed(CLASS.INCLUDED, isWithin);
// TODO: included/unincluded callback here
shape.classed(CLASS.SELECTED, !isSelected);
toggle.call($$, !isSelected, shape, d, i);
shape.classed(CLASS.SELECTED, isWithin);
toggle.call($$, isWithin, shape, d, i);
}
});
};

Loading…
Cancel
Save