added back the jquery animations
This commit is contained in:
parent
4e5f37a05d
commit
5dbb549bbe
|
@ -403,15 +403,20 @@ var dragOptions={
|
||||||
drag: function(event, ui) {
|
drag: function(event, ui) {
|
||||||
var scrollingArea = FileList.$container;
|
var scrollingArea = FileList.$container;
|
||||||
var currentScrollTop = $(scrollingArea).scrollTop();
|
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) {
|
||||||
$(scrollingArea).scrollTop(currentScrollTop - 10);
|
$('html, body').animate({
|
||||||
}
|
|
||||||
else if (event.pageY > bottom) {
|
scrollTop: $(scrollingArea).scrollTop(currentScrollTop - 10)
|
||||||
$(scrollingArea).scrollTop(currentScrollTop + 10);
|
}, 400);
|
||||||
|
|
||||||
|
} else if (event.pageY > bottom) {
|
||||||
|
$('html, body').animate({
|
||||||
|
scrollTop: $(scrollingArea).scrollTop(currentScrollTop + 10)
|
||||||
|
}, 400);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue