Seems like we are almost there, just scrolling too fast can trigger continuous reader.
This commit is contained in:
parent
94d34802bc
commit
a2640f32bf
1 changed files with 2 additions and 0 deletions
|
|
@ -298,6 +298,7 @@ export class InfiniteScrollerComponent implements OnInit, OnChanges, OnDestroy {
|
||||||
this.debugLog('[Scroll] Image is visible from scroll, isScrolling is now false');
|
this.debugLog('[Scroll] Image is visible from scroll, isScrolling is now false');
|
||||||
this.isScrolling = false;
|
this.isScrolling = false;
|
||||||
this.cdRef.markForCheck();
|
this.cdRef.markForCheck();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.isScrolling) {
|
if (!this.isScrolling) {
|
||||||
|
|
@ -322,6 +323,7 @@ export class InfiniteScrollerComponent implements OnInit, OnChanges, OnDestroy {
|
||||||
const img = this.findClosestVisibleImage(closestImages);
|
const img = this.findClosestVisibleImage(closestImages);
|
||||||
|
|
||||||
if (img != null) {
|
if (img != null) {
|
||||||
|
this.debugLog('[handleScrollEndEvent] setting page while not scrolling ', img.getAttribute('page') || this.pageNum);
|
||||||
this.setPageNum(parseInt(img.getAttribute('page') || this.pageNum + '', 10));
|
this.setPageNum(parseInt(img.getAttribute('page') || this.pageNum + '', 10));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue