File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ export declare interface ScrollModel {
3535 velocity ?: number ;
3636
3737 /**
38- * Defines the distance from edges where scrolling should be started.
38+ * Defines the distance from borders where scrolling should be started.
3939 */
4040 offset ?: number ;
4141
Original file line number Diff line number Diff line change @@ -47,9 +47,9 @@ export class ScrollService {
4747 }
4848
4949 doScroll ( direction ) {
50- const scrollState = this . model . scroll ;
51- const scroll = scrollState ( ) ;
52- const velocity = scroll . velocity ;
50+ const scroll = this . model . scroll ;
51+ const scrollState = scroll ( ) ;
52+ const velocity = scrollState . velocity ;
5353 const scrolledToEnd = ( ) => this . isScrolledToEnd ( direction ) ;
5454
5555 return ( ) => setInterval ( ( ) => {
@@ -58,15 +58,15 @@ export class ScrollService {
5858 case 'right' :
5959 case 'bottom' : {
6060 const course = direction === 'bottom' ? 'top' : 'left' ;
61- const origin = scroll [ course ] ;
62- scrollState ( { [ course ] : origin + velocity } ) ;
61+ const origin = scrollState [ course ] ;
62+ scroll ( { [ course ] : origin + velocity } ) ;
6363 break ;
6464 }
6565 case 'left' :
6666 case 'top' : {
6767 const course = direction === 'top' ? 'top' : 'left' ;
68- const origin = scroll [ course ] ;
69- scrollState ( { [ course ] : origin - velocity } ) ;
68+ const origin = scrollState [ course ] ;
69+ scroll ( { [ course ] : origin - velocity } ) ;
7070 break ;
7171 }
7272 default : {
You can’t perform that action at this time.
0 commit comments