mirror of
https://github.com/Retropex/mempool.git
synced 2025-05-28 04:52:31 +02:00
Merge pull request #5780 from mempool/natsoni/fix-scrollable-blockchain-ltr
Fix left-to-right scrollable blockchain
This commit is contained in:
commit
1f4c56c19a
@ -194,6 +194,7 @@ export class StartComponent implements OnInit, AfterViewChecked, OnDestroy {
|
|||||||
applyScrollLeft(): void {
|
applyScrollLeft(): void {
|
||||||
if (this.blockchainContainer?.nativeElement?.scrollWidth) {
|
if (this.blockchainContainer?.nativeElement?.scrollWidth) {
|
||||||
let lastScrollLeft = null;
|
let lastScrollLeft = null;
|
||||||
|
if (!this.timeLtr) {
|
||||||
while (this.scrollLeft < 0 && this.shiftPagesForward() && lastScrollLeft !== this.scrollLeft) {
|
while (this.scrollLeft < 0 && this.shiftPagesForward() && lastScrollLeft !== this.scrollLeft) {
|
||||||
lastScrollLeft = this.scrollLeft;
|
lastScrollLeft = this.scrollLeft;
|
||||||
this.scrollLeft += this.pageWidth;
|
this.scrollLeft += this.pageWidth;
|
||||||
@ -203,6 +204,7 @@ export class StartComponent implements OnInit, AfterViewChecked, OnDestroy {
|
|||||||
lastScrollLeft = this.scrollLeft;
|
lastScrollLeft = this.scrollLeft;
|
||||||
this.scrollLeft -= this.pageWidth;
|
this.scrollLeft -= this.pageWidth;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
this.blockchainContainer.nativeElement.scrollLeft = this.scrollLeft;
|
this.blockchainContainer.nativeElement.scrollLeft = this.scrollLeft;
|
||||||
}
|
}
|
||||||
this.cd.detectChanges();
|
this.cd.detectChanges();
|
||||||
|
Loading…
Reference in New Issue
Block a user