flip multiblock mempool
This commit is contained in:
parent
d2b918cf15
commit
f7422f29dc
@ -398,7 +398,8 @@ export class BlockOverviewMultiComponent implements AfterViewInit, OnDestroy, On
|
|||||||
for (let i = 0; i < this.scenes.length; i++) {
|
for (let i = 0; i < this.scenes.length; i++) {
|
||||||
const blocksPerRow = Math.floor(this.displayWidth / (this.displayBlockWidth + (this.displayPadding * 2)));
|
const blocksPerRow = Math.floor(this.displayWidth / (this.displayBlockWidth + (this.displayPadding * 2)));
|
||||||
const x = this.displayPadding + ((i % blocksPerRow) * (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)));
|
const y = this.displayPadding + this.displayHeight - ((row + 1) * (this.displayBlockWidth + (this.displayPadding * 2)));
|
||||||
if (this.scenes[i]) {
|
if (this.scenes[i]) {
|
||||||
this.scenes[i].resize({ x, y, width: this.displayBlockWidth, height: this.displayBlockWidth, animate: false });
|
this.scenes[i].resize({ x, y, width: this.displayBlockWidth, height: this.displayBlockWidth, animate: false });
|
||||||
|
@ -12,14 +12,3 @@
|
|||||||
[animationOffset]="animationOffset"
|
[animationOffset]="animationOffset"
|
||||||
[disableSpinner]="true"
|
[disableSpinner]="true"
|
||||||
></app-block-overview-multi>
|
></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>
|
|
@ -74,11 +74,6 @@ export class EightMempoolComponent implements OnInit, OnDestroy {
|
|||||||
testShiftTimeout: number;
|
testShiftTimeout: number;
|
||||||
|
|
||||||
showInfo: boolean = true;
|
showInfo: boolean = true;
|
||||||
blockInfo: { label: string}[] = [
|
|
||||||
{ label: '' },
|
|
||||||
{ label: 'mempool' },
|
|
||||||
{ label: 'blocks' },
|
|
||||||
];
|
|
||||||
|
|
||||||
wrapperStyle = {
|
wrapperStyle = {
|
||||||
'--block-width': '1080px',
|
'--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.queryParamsSubscription = this.route.queryParams.subscribe((params) => {
|
||||||
this.numBlocks = Number.isInteger(Number(params.numBlocks)) ? Number(params.numBlocks) : 8;
|
this.numBlocks = Number.isInteger(Number(params.numBlocks)) ? Number(params.numBlocks) : 8;
|
||||||
this.blockIndices = [...Array(this.numBlocks).keys()];
|
this.blockIndices = [...Array(this.numBlocks).keys()];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user