fixed to work with share links as well

This commit is contained in:
Erik Pellikka 2016-02-23 09:05:06 -05:00 committed by Morris Jobke
parent e7366213f5
commit 45ff21e8d5
No known key found for this signature in database
GPG key ID: 9CE5ED29E7FCD38A

View file

@ -401,20 +401,21 @@ var dragOptions={
$selectedFiles.closest('tr').fadeTo(250, 1).removeClass('dragging'); $selectedFiles.closest('tr').fadeTo(250, 1).removeClass('dragging');
}, },
drag: function(event, ui) { drag: function(event, ui) {
var currentScrollTop = $("#app-content").scrollTop(); 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 bottom = $(window).innerHeight() - scrollArea;
var top = $(window).scrollTop() + scrollArea; var top = $(window).scrollTop() + scrollArea;
if (event.pageY < top){ if (event.pageY < top){
$("#app-content").scrollTop(currentScrollTop-=10); $(scrollingArea).scrollTop(currentScrollTop-=10);
} }
if (event.pageY > bottom) if (event.pageY > bottom)
{ {
$("#app-content").scrollTop(currentScrollTop+=10); $(scrollingArea).scrollTop(currentScrollTop+=10);
} }