Scroll to input/output when clicked in tx diagram

This commit is contained in:
Mononaut
2022-10-04 21:00:46 +00:00
parent 54c44565fb
commit c10ace8fb5
7 changed files with 88 additions and 50 deletions

View File

@@ -47,6 +47,7 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
now = new Date().getTime();
timeAvg$: Observable<number>;
liquidUnblinding = new LiquidUnblinding();
inputIndex: number;
outputIndex: number;
showFlow: boolean = true;
graphExpanded: boolean = false;
@@ -334,6 +335,16 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
this.graphExpanded = false;
}
selectInput(input) {
this.inputIndex = input;
this.outputIndex = null;
}
selectOutput(output) {
this.outputIndex = output;
this.inputIndex = null;
}
@HostListener('window:resize', ['$event'])
setGraphSize(): void {
if (this.graphContainer) {