mirror of
https://github.com/Retropex/mempool.git
synced 2025-05-13 02:30:41 +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,14 +194,16 @@ 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;
|
||||||
while (this.scrollLeft < 0 && this.shiftPagesForward() && lastScrollLeft !== this.scrollLeft) {
|
if (!this.timeLtr) {
|
||||||
lastScrollLeft = this.scrollLeft;
|
while (this.scrollLeft < 0 && this.shiftPagesForward() && lastScrollLeft !== this.scrollLeft) {
|
||||||
this.scrollLeft += this.pageWidth;
|
lastScrollLeft = this.scrollLeft;
|
||||||
}
|
this.scrollLeft += this.pageWidth;
|
||||||
lastScrollLeft = null;
|
}
|
||||||
while (this.scrollLeft > this.blockchainContainer.nativeElement.scrollWidth && this.shiftPagesBack() && lastScrollLeft !== this.scrollLeft) {
|
lastScrollLeft = null;
|
||||||
lastScrollLeft = this.scrollLeft;
|
while (this.scrollLeft > this.blockchainContainer.nativeElement.scrollWidth && this.shiftPagesBack() && lastScrollLeft !== this.scrollLeft) {
|
||||||
this.scrollLeft -= this.pageWidth;
|
lastScrollLeft = this.scrollLeft;
|
||||||
|
this.scrollLeft -= this.pageWidth;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.blockchainContainer.nativeElement.scrollLeft = this.scrollLeft;
|
this.blockchainContainer.nativeElement.scrollLeft = this.scrollLeft;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user