flip multiblock mempool

This commit is contained in:
Mononaut 2024-10-17 01:30:43 +00:00
parent d2b918cf15
commit f7422f29dc
No known key found for this signature in database
GPG Key ID: A3F058E41374C04E
3 changed files with 3 additions and 22 deletions

View File

@ -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 });

View File

@ -11,15 +11,4 @@
[animationDuration]="animationDuration"
[animationOffset]="animationOffset"
[disableSpinner]="true"
></app-block-overview-multi>
<div class="blocks" [class.wrap]="wrapBlocks">
<ng-container *ngFor="let i of blockIndices">
<div class="block-wrapper" [style]="wrapperStyle">
<div class="block-container" [style]="containerStyle">
<div *ngIf="showInfo && blockInfo[i]" class="info" @infoChange>
<h1 class="height">{{ blockInfo[i].label }}</h1>
</div>
</div>
</div>
</ng-container>
</div>
></app-block-overview-multi>

View File

@ -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()];