This commit is contained in:
Erik Pellikka 2016-02-23 14:45:38 +02:00 committed by Morris Jobke
parent 5711e88093
commit 18b7b61f06
No known key found for this signature in database
GPG Key ID: 9CE5ED29E7FCD38A
1 changed files with 7 additions and 7 deletions

View File

@ -402,20 +402,20 @@ var dragOptions={
},
drag: function(event, ui) {
var currentScrollTop = $("#app-content").scrollTop();
var scrollArea = Math.min(Math.floor($(window).innerHeight()/2), 300);
var scrollArea = Math.min(Math.floor($(window).innerHeight()/2), 100);
var bottom = $(window).innerHeight() - scrollArea;
var top = $(window).scrollTop() + scrollArea;
if (event.pageY < top){
$('html, body').animate({
scrollTop: $("#app-content").scrollTop(currentScrollTop-=10)
},800);
scrollTop: $("#app-content").scrollTop(currentScrollTop-=10);
}
if (event.pageY > bottom)
{
$('html, body').animate({
scrollTop: $("#app-content").scrollTop(currentScrollTop+=10)
},800);
scrollTop: $("#app-content").scrollTop(currentScrollTop+=10);
}
}