Seems like we are almost there, just scrolling too fast can trigger continuous reader.
This commit is contained in:
parent
a2640f32bf
commit
b0babb009e
1 changed files with 5 additions and 0 deletions
|
@ -533,6 +533,11 @@ export class InfiniteScrollerComponent implements OnInit, OnChanges, OnDestroy {
|
||||||
this.debugLog('[Image Load] ! Loaded current page !', this.pageNum);
|
this.debugLog('[Image Load] ! Loaded current page !', this.pageNum);
|
||||||
this.currentPageElem = this.document.querySelector('img#page-' + this.pageNum);
|
this.currentPageElem = this.document.querySelector('img#page-' + this.pageNum);
|
||||||
|
|
||||||
|
// This scrollToCurrentPage is needed to resume from the correct page, but it also select newly inserted images
|
||||||
|
// before we are ready
|
||||||
|
if (this.currentPageElem && !this.isElementVisible(this.currentPageElem) && !this.isScrolling) {
|
||||||
|
setTimeout(() => this.scrollToCurrentPage(), 100);
|
||||||
|
}
|
||||||
// There needs to be a bit of time before we scroll
|
// There needs to be a bit of time before we scroll
|
||||||
// if (this.currentPageElem && !this.isElementVisible(this.currentPageElem)) {
|
// if (this.currentPageElem && !this.isElementVisible(this.currentPageElem)) {
|
||||||
// //this.scrollToCurrentPage();
|
// //this.scrollToCurrentPage();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue