File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed
Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments