Added threshold distance to scroll gesture