Skip to content

Commit 758ca97

Browse files
committed
ref.
1 parent 4496701 commit 758ca97

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

src/core/scroll/scroll.model.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

src/core/scroll/scroll.service.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff 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: {

0 commit comments

Comments
 (0)