This is a situation where we do not want transitions to interrupt themselves. Hovering over a filter highlights various circles and clicking on it removes/adds them. To illustrate the problem, click on a filter then quickly move the mouse away.
The circles have an enter transition (filter is checked - come into screen), an exit transition (filter is unchecked - leave screen), and an update transition (filter is hovered over - highlight element).
Since we're using the same control to enter/exit/highlight (i.e. checkboxes), whenever the user unchecks a filter and then moves the mouse away, the highlight transition cancels the exit transition and the circle sticks around in the state it was when it got interrupted.
Looking for a way to chain the highlight transition so that it doesn't cancel the exit transition. Can't use transition.each
or transition.transition
methods because the elements selected by the exit transition may not be the same as those selected by the highlight transition (e.g. user clicks on Red Filter then quickly hovers over Blue Filter).