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 // line/area selection not supported yet
return; return;
} }
if (isWithin ^ isIncluded) { if (isWithin ^ isSelected || isWithin ^ isIncluded) {
shape.classed(CLASS.INCLUDED, !isIncluded); shape.classed(CLASS.INCLUDED, isWithin);
// TODO: included/unincluded callback here // TODO: included/unincluded callback here
shape.classed(CLASS.SELECTED, !isSelected); shape.classed(CLASS.SELECTED, isWithin);
toggle.call($$, !isSelected, shape, d, i); toggle.call($$, isWithin, shape, d, i);
} }
}); });
}; };

Loading…
Cancel
Save