From f7422f29dcf146ab420ba0dfdea2610dd478b061 Mon Sep 17 00:00:00 2001 From: Mononaut Date: Thu, 17 Oct 2024 01:30:43 +0000 Subject: [PATCH] flip multiblock mempool --- .../block-overview-multi.component.ts | 3 ++- .../eight-mempool/eight-mempool.component.html | 13 +------------ .../eight-mempool/eight-mempool.component.ts | 9 --------- 3 files changed, 3 insertions(+), 22 deletions(-) diff --git a/frontend/src/app/components/block-overview-multi/block-overview-multi.component.ts b/frontend/src/app/components/block-overview-multi/block-overview-multi.component.ts index 526bcc040..63c6f5aae 100644 --- a/frontend/src/app/components/block-overview-multi/block-overview-multi.component.ts +++ b/frontend/src/app/components/block-overview-multi/block-overview-multi.component.ts @@ -398,7 +398,8 @@ export class BlockOverviewMultiComponent implements AfterViewInit, OnDestroy, On for (let i = 0; i < this.scenes.length; i++) { const blocksPerRow = Math.floor(this.displayWidth / (this.displayBlockWidth + (this.displayPadding * 2))); const x = this.displayPadding + ((i % blocksPerRow) * (this.displayBlockWidth + (this.displayPadding * 2))); - const row = Math.floor(i / blocksPerRow); + const numRows = Math.ceil(this.scenes.length / blocksPerRow); + const row = numRows - Math.floor(i / blocksPerRow) - 1; const y = this.displayPadding + this.displayHeight - ((row + 1) * (this.displayBlockWidth + (this.displayPadding * 2))); if (this.scenes[i]) { this.scenes[i].resize({ x, y, width: this.displayBlockWidth, height: this.displayBlockWidth, animate: false }); diff --git a/frontend/src/app/components/eight-mempool/eight-mempool.component.html b/frontend/src/app/components/eight-mempool/eight-mempool.component.html index 4c4fc452b..eebd3a120 100644 --- a/frontend/src/app/components/eight-mempool/eight-mempool.component.html +++ b/frontend/src/app/components/eight-mempool/eight-mempool.component.html @@ -11,15 +11,4 @@ [animationDuration]="animationDuration" [animationOffset]="animationOffset" [disableSpinner]="true" -> -
- -
-
-
-

{{ blockInfo[i].label }}

-
-
-
-
-
\ No newline at end of file +> \ No newline at end of file diff --git a/frontend/src/app/components/eight-mempool/eight-mempool.component.ts b/frontend/src/app/components/eight-mempool/eight-mempool.component.ts index f63972104..fe6b47496 100644 --- a/frontend/src/app/components/eight-mempool/eight-mempool.component.ts +++ b/frontend/src/app/components/eight-mempool/eight-mempool.component.ts @@ -74,11 +74,6 @@ export class EightMempoolComponent implements OnInit, OnDestroy { testShiftTimeout: number; showInfo: boolean = true; - blockInfo: { label: string}[] = [ - { label: '' }, - { label: 'mempool' }, - { label: 'blocks' }, - ]; wrapperStyle = { '--block-width': '1080px', @@ -150,10 +145,6 @@ export class EightMempoolComponent implements OnInit, OnDestroy { } }); - this.mempoolBlockSub = this.stateService.mempoolBlocks$.subscribe((blocks) => { - this.blockInfo[0].label = `+${blocks.length - this.numBlocks}`; - }); - this.queryParamsSubscription = this.route.queryParams.subscribe((params) => { this.numBlocks = Number.isInteger(Number(params.numBlocks)) ? Number(params.numBlocks) : 8; this.blockIndices = [...Array(this.numBlocks).keys()];