swipe defined in the js component