added support for snapping when scrolling parts of documents