Set swipe position based on the current state