summaryrefslogtreecommitdiffstats
path: root/apps/files/js/files.js
diff options
context:
space:
mode:
authorErik Pellikka <erik@pellikka.org>2016-02-23 09:56:05 -0500
committerMorris Jobke <hey@morrisjobke.de>2016-05-13 21:01:13 +0200
commit5dbb549bbea8e555543dd50ca7688d8486057f5f (patch)
tree5ddba30fe5b50a58bbfe7646daf04d18430675b3 /apps/files/js/files.js
parent4e5f37a05dc3c97d6fd1a122dafd25630f809ecf (diff)
downloadnextcloud-server-5dbb549bbea8e555543dd50ca7688d8486057f5f.tar.gz
nextcloud-server-5dbb549bbea8e555543dd50ca7688d8486057f5f.zip
added back the jquery animations
Diffstat (limited to 'apps/files/js/files.js')
-rw-r--r--apps/files/js/files.js17
1 files changed, 11 insertions, 6 deletions
diff --git a/apps/files/js/files.js b/apps/files/js/files.js
index 38443842903..8542bd50476 100644
--- a/apps/files/js/files.js
+++ b/apps/files/js/files.js
@@ -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);
}
}