Updates scroll direction calculation.