Commit eb08e08b authored by Masayuki Tanaka's avatar Masayuki Tanaka

Refactor focus/defocus legend item

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