Added scrolling direction constraint.