Skip to content

Commit

Permalink
MDL-51803 core: integration review
Browse files Browse the repository at this point in the history
  • Loading branch information
marinaglancy committed Oct 8, 2018
1 parent 539cb25 commit 6b9cb24
Show file tree
Hide file tree
Showing 4 changed files with 117 additions and 72 deletions.
2 changes: 1 addition & 1 deletion lib/amd/build/autoscroll.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/amd/build/sortable_list.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 19 additions & 2 deletions lib/amd/src/autoscroll.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ define(['jquery'], function($) {
* This should be called in response to mouse down or touch start.
*
* @public
* @param {Object} callback Optional callback that is called every time it scrolls
* @param {Function} callback Optional callback that is called every time it scrolls
*/
start: function(callback) {
$(window).on('mousemove', autoscroll.mouseMove);
Expand Down Expand Up @@ -188,5 +188,22 @@ define(['jquery'], function($) {
}
};

return autoscroll;
return {
/**
* Starts automatic scrolling if user moves near edge of window.
* This should be called in response to mouse down or touch start.
*
* @public
* @param {Function} callback Optional callback that is called every time it scrolls
*/
start: autoscroll.start,

/**
* Stops automatic scrolling. This should be called in response to mouse up or touch end.
*
* @public
*/
stop: autoscroll.stop,
};

});
Loading

0 comments on commit 6b9cb24

Please sign in to comment.