update direction of horizontal-slide