Skip to content

Commit

Permalink
added back the jquery animations
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikPel authored and MorrisJobke committed May 13, 2016
1 parent 4e5f37a commit 5dbb549
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions apps/files/js/files.js
Original file line number Diff line number Diff line change
Expand Up @@ -403,15 +403,20 @@ var dragOptions={
drag: function(event, ui) {
var scrollingArea = FileList.$container;
var currentScrollTop = $(scrollingArea).scrollTop();
var scrollArea = Math.min(Math.floor($(window).innerHeight()/2), 100);
var scrollArea = Math.min(Math.floor($(window).innerHeight() / 2), 100);

var bottom = $(window).innerHeight() - scrollArea;
var top = $(window).scrollTop() + scrollArea;
if (event.pageY < top){
$(scrollingArea).scrollTop(currentScrollTop - 10);
}
else if (event.pageY > bottom) {
$(scrollingArea).scrollTop(currentScrollTop + 10);
if (event.pageY < top) {
$('html, body').animate({

scrollTop: $(scrollingArea).scrollTop(currentScrollTop - 10)
}, 400);

} else if (event.pageY > bottom) {
$('html, body').animate({
scrollTop: $(scrollingArea).scrollTop(currentScrollTop + 10)
}, 400);
}

}
Expand Down

0 comments on commit 5dbb549

Please sign in to comment.