Implemented function to open panel with swipe gesture