To support swipe function including top, down, right, left.