Base implementation of swipe gesture.