Browse Source

Refactor focus/defocus legend item

pull/200/merge
Masayuki Tanaka 11 years ago
parent
commit
eb08e08b07
  1. 12
      c3.js
  2. 6
      c3.min.js

12
c3.js

@ -3763,7 +3763,7 @@
callback = getArcOnMouseOver();
// transitions
expandArc(updated.data.id);
focusLegend(updated.data.id);
toggleFocusLegend(updated.data.id, true);
callback(arcData, i);
})
.on('mousemove', function (d) {
@ -3931,12 +3931,6 @@
}
});
}
function focusLegend(id) {
toggleFocusLegend(id, true);
}
function defocusLegend(id) {
toggleFocusLegend(id, false);
}
function revertLegend() {
legend.selectAll('.' + CLASS.legendItem)
.transition().duration(100)
@ -4176,7 +4170,7 @@
if (hasArcType(c3.data.targets)) {
expandArc(targetId, true);
}
focusLegend(targetId);
toggleFocusLegend(targetId, true);
};
c3.defocus = function (targetId) {
@ -4192,7 +4186,7 @@
if (hasArcType(c3.data.targets)) {
unexpandArc(targetId);
}
defocusLegend(targetId);
toggleFocusLegend(targetId, false);
};
c3.revert = function (targetId) {

6
c3.min.js vendored

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save