multiblock goggles

This commit is contained in:
Mononaut 2024-10-17 08:25:53 +00:00
parent 580ac889df
commit 2e665d57ac
No known key found for this signature in database
GPG Key ID: A3F058E41374C04E
3 changed files with 10 additions and 5 deletions

View File

@ -179,13 +179,15 @@ export class BlockOverviewMultiComponent implements AfterViewInit, OnDestroy, On
setFilterFlags(goggle?: ActiveFilter): void { setFilterFlags(goggle?: ActiveFilter): void {
this.filterMode = goggle?.mode || this.filterMode; this.filterMode = goggle?.mode || this.filterMode;
this.gradientMode = goggle?.gradient || this.gradientMode; this.gradientMode = goggle?.gradient || 'fee'; // this.gradientMode;
this.activeFilterFlags = goggle?.filters ? toFlags(goggle.filters) : this.filterFlags; this.activeFilterFlags = goggle?.filters ? toFlags(goggle.filters) : this.filterFlags;
for (const scene of this.scenes) { for (const scene of this.scenes) {
if (this.activeFilterFlags != null && this.filtersAvailable) { if (scene) {
scene.setColorFunction(this.getFilterColorFunction(this.activeFilterFlags, this.gradientMode)); if (this.activeFilterFlags != null && this.filtersAvailable) {
} else { scene.setColorFunction(this.getFilterColorFunction(this.activeFilterFlags, this.gradientMode));
scene.setColorFunction(this.getFilterColorFunction(0n, this.gradientMode)); } else {
scene.setColorFunction(this.getFilterColorFunction(0n, this.gradientMode));
}
} }
} }
this.start(); this.start();

View File

@ -8,6 +8,7 @@
[blockLimit]="stateService.blockVSize" [blockLimit]="stateService.blockVSize"
[orientation]="'left'" [orientation]="'left'"
[flip]="true" [flip]="true"
[showFilters]="true"
[animationDuration]="animationDuration" [animationDuration]="animationDuration"
[animationOffset]="animationOffset" [animationOffset]="animationOffset"
[disableSpinner]="true" [disableSpinner]="true"

View File

@ -103,6 +103,8 @@ export class EightMempoolComponent implements OnInit, OnDestroy {
this.websocketService.want(['blocks', 'mempool-blocks']); this.websocketService.want(['blocks', 'mempool-blocks']);
this.network = this.stateService.network; this.network = this.stateService.network;
this.stateService.activeGoggles$.next({ mode: 'and', filters: [], gradient: 'fee' });
this.blockSub = this.stateService.mempoolBlockUpdate$.subscribe((update) => { this.blockSub = this.stateService.mempoolBlockUpdate$.subscribe((update) => {
// process update // process update
if (isMempoolDelta(update)) { if (isMempoolDelta(update)) {