Commit eb08e08b authored by Masayuki Tanaka's avatar Masayuki Tanaka

Refactor focus/defocus legend item

parent a4bee876
......@@ -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) {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment