Highlight url input/output in tx diagram & list
This commit is contained in:
@@ -41,6 +41,18 @@
|
||||
<stop offset="98%" [attr.stop-color]="gradient[0]" />
|
||||
<stop offset="100%" [attr.stop-color]="gradient[0]" />
|
||||
</linearGradient>
|
||||
<linearGradient id="input-highlight-gradient" x1="0%" y1="0%" x2="100%" y2="0%">
|
||||
<stop offset="0%" [attr.stop-color]="gradient[0]" />
|
||||
<stop offset="2%" [attr.stop-color]="gradient[0]" />
|
||||
<stop offset="30%" stop-color="#1bd8f4" />
|
||||
<stop offset="100%" [attr.stop-color]="gradient[1]" />
|
||||
</linearGradient>
|
||||
<linearGradient id="output-highlight-gradient" x1="0%" y1="0%" x2="100%" y2="0%">
|
||||
<stop offset="0%" [attr.stop-color]="gradient[1]" />
|
||||
<stop offset="70%" stop-color="#1bd8f4" />
|
||||
<stop offset="98%" [attr.stop-color]="gradient[0]" />
|
||||
<stop offset="100%" [attr.stop-color]="gradient[0]" />
|
||||
</linearGradient>
|
||||
<linearGradient id="fee-hover-gradient" x1="0%" y1="0%" x2="100%" y2="0%">
|
||||
<stop offset="0%" [attr.stop-color]="gradient[1]" />
|
||||
<stop offset="100%" stop-color="white" />
|
||||
@@ -56,6 +68,7 @@
|
||||
<path
|
||||
[attr.d]="input.path"
|
||||
class="line {{input.class}}"
|
||||
[class.highlight]="inputData[i].index === inputIndex"
|
||||
[style]="input.style"
|
||||
attr.marker-start="url(#{{input.class}}-arrow)"
|
||||
(pointerover)="onHover($event, 'input', i);"
|
||||
@@ -67,6 +80,7 @@
|
||||
<path
|
||||
[attr.d]="output.path"
|
||||
class="line {{output.class}}"
|
||||
[class.highlight]="outputData[i].index === outputIndex"
|
||||
[style]="output.style"
|
||||
attr.marker-start="url(#{{output.class}}-arrow)"
|
||||
(pointerover)="onHover($event, 'output', i);"
|
||||
|
||||
@@ -12,6 +12,17 @@
|
||||
stroke: url(#fee-gradient);
|
||||
}
|
||||
|
||||
&.highlight {
|
||||
z-index: 8;
|
||||
cursor: pointer;
|
||||
&.input {
|
||||
stroke: url(#input-highlight-gradient);
|
||||
}
|
||||
&.output {
|
||||
stroke: url(#output-highlight-gradient);
|
||||
}
|
||||
}
|
||||
|
||||
&:hover {
|
||||
z-index: 10;
|
||||
cursor: pointer;
|
||||
|
||||
@@ -40,6 +40,8 @@ export class TxBowtieGraphComponent implements OnInit, OnChanges {
|
||||
@Input() minWeight = 2; //
|
||||
@Input() maxStrands = 24; // number of inputs/outputs to keep fully on-screen.
|
||||
@Input() tooltip = false;
|
||||
@Input() inputIndex: number;
|
||||
@Input() outputIndex: number;
|
||||
|
||||
@Output() selectInput = new EventEmitter<number>();
|
||||
@Output() selectOutput = new EventEmitter<number>();
|
||||
@@ -378,7 +380,7 @@ export class TxBowtieGraphComponent implements OnInit, OnChanges {
|
||||
const output = this.tx.vout[index];
|
||||
const outspend = this.outspends[index];
|
||||
if (output && outspend && outspend.spent && outspend.txid) {
|
||||
this.router.navigate([this.relativeUrlPipe.transform('/tx'), outspend.txid], {
|
||||
this.router.navigate([this.relativeUrlPipe.transform('/tx'), outspend.vin + ':' + outspend.txid], {
|
||||
queryParamsHandling: 'merge',
|
||||
fragment: 'flow'
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user