Skip to content

Commit 2e4c033

Browse files
committed
added back the jquery animations
1 parent 867bb19 commit 2e4c033

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

apps/files/js/files.js

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -403,15 +403,20 @@ var dragOptions={
403403
drag: function(event, ui) {
404404
var scrollingArea = FileList.$container;
405405
var currentScrollTop = $(scrollingArea).scrollTop();
406-
var scrollArea = Math.min(Math.floor($(window).innerHeight()/2), 100);
406+
var scrollArea = Math.min(Math.floor($(window).innerHeight() / 2), 100);
407407

408408
var bottom = $(window).innerHeight() - scrollArea;
409409
var top = $(window).scrollTop() + scrollArea;
410-
if (event.pageY < top){
411-
$(scrollingArea).scrollTop(currentScrollTop - 10);
412-
}
413-
else if (event.pageY > bottom) {
414-
$(scrollingArea).scrollTop(currentScrollTop + 10);
410+
if (event.pageY < top) {
411+
$('html, body').animate({
412+
413+
scrollTop: $(scrollingArea).scrollTop(currentScrollTop - 10)
414+
}, 400);
415+
416+
} else if (event.pageY > bottom) {
417+
$('html, body').animate({
418+
scrollTop: $(scrollingArea).scrollTop(currentScrollTop + 10)
419+
}, 400);
415420
}
416421

417422
}

0 commit comments

Comments
 (0)