check whether the panning is horizontal