diff --git a/src/lib/listing/scroll-button/scroll-button.component.ts b/src/lib/listing/scroll-button/scroll-button.component.ts index 22a3b05..e13f7c4 100644 --- a/src/lib/listing/scroll-button/scroll-button.component.ts +++ b/src/lib/listing/scroll-button/scroll-button.component.ts @@ -29,7 +29,7 @@ export class ScrollButtonComponent implements OnInit { ngOnInit(): void { const scrollSize = () => this.scrollViewport.getDataLength() * this.itemSize; const scrollIsNeeded = () => this.scrollViewport.getViewportSize() < scrollSize(); - const reachedEnd = (type: ButtonType) => this.scrollViewport.measureScrollOffset(type) === 0; + const reachedEnd = (type: ButtonType) => this.scrollViewport.measureScrollOffset(type) < 0.5; const showScrollUp = () => scrollIsNeeded() && !reachedEnd(ButtonTypes.top); const showScrollDown = () => scrollIsNeeded() && !reachedEnd(ButtonTypes.bottom);