It seems like the view should not matter. If the gesture detector only runs on the container element that holds the frames, it will only ever send events when the frames are displayed.  So I don't think you actually need a switch statement here.