Add lightning node link previews

This commit is contained in:
Mononaut
2022-08-11 17:19:12 +00:00
parent 67ce4a956f
commit 18d18fa234
15 changed files with 322 additions and 15 deletions

View File

@@ -1,4 +1,4 @@
import { ChangeDetectionStrategy, Component, HostListener, Input, NgZone, OnDestroy, OnInit, ViewChild } from '@angular/core';
import { ChangeDetectionStrategy, Component, HostListener, Input, Output, EventEmitter, NgZone, OnDestroy, OnInit, ViewChild } from '@angular/core';
import { SeoService } from 'src/app/services/seo.service';
import { ApiService } from 'src/app/services/api.service';
import { Observable, switchMap, tap, zip } from 'rxjs';
@@ -20,9 +20,11 @@ export class NodesChannelsMap implements OnInit, OnDestroy {
@Input() style: 'graph' | 'nodepage' | 'widget' | 'channelpage' = 'graph';
@Input() publicKey: string | undefined;
@Input() channel: any[] = [];
@Input() fitContainer = false;
@Output() readyEvent = new EventEmitter();
observable$: Observable<any>;
center: number[] | undefined;
zoom: number | undefined;
channelWidth = 0.6;
@@ -313,4 +315,8 @@ export class NodesChannelsMap implements OnInit, OnDestroy {
this.chartInstance.setOption(chartOptions);
});
}
onChartFinished(e) {
this.readyEvent.emit();
}
}