guidobouman/jquery-panelsnap — pull request #40 by aalexandrov (2014-04-24 14:15:58+00:00)
Title: Minor fixes in the scrolling logic.

This PR fixes several minor issues in the snapping logic.

* Explicit `self.processScroll` handler registration is no longer needed in `scrollStop` at line 156 as the event will be triggered anyway by the `mouseUp` handler.
* Changing the comparison from `<` to `<=` resolves an issue where the user scrolls to the very bottom and then to the very top of the container with the mouse.
* Finally, moving the `self.activatePanel($target);` at the end of the scroll callback ensures that any animations that might be triggered by an `onActivate` event are not interleaved with the auto-scroll trigegred by `snapToPanel`.
* Last, using `self.$snapContainer.scrollTop()` to gather the `scrollOffset` seems more readable, but AFAIK it should work the same as in the previous version.