d3/d3-brush

Brush loses functionality if mouseup occurs outside frame

rbwest opened this issue · 1 comments

Typically clicking on a brush context results creates an "end" event with a null selection. When these conditions are seen the brush can be re-initialized to the entire range of the context area as is done in this example.

If a brush event is started but the user releases the mouse outside of the frame, then the brush event will still be going on when the user mouses back into the frame. The user then must click to end the brush event, but in doing so the brush selection rect disappears.

At this point clicking the brush context will no longer create an "end" event with a null selection to reset the brush selection to the entire range of the context area.

Thanks for the report. This sounds like a duplicate of #18, plus the general weirdness of how events work in the context of frames. For the latter, see d3/d3-drag#9 for discussion.