Passing node to context menu

This commit is contained in:
ziajka
2017-11-29 13:29:32 +01:00
parent 0cc7b62526
commit 055dde4ea5
4 changed files with 15 additions and 10 deletions

View File

@ -1,11 +1,11 @@
<div class="context-menu" [style.left]="leftPosition" [style.top]="topPosition">
<div class="context-menu" [style.left]="leftPosition" [style.top]="topPosition" *ngIf="node">
<span [matMenuTriggerFor]="contextMenu"></span>
<mat-menu #contextMenu="matMenu">
<button mat-menu-item>
<button mat-menu-item *ngIf="node.status == 'stopped'">
<mat-icon>play_arrow</mat-icon>
<span>Start</span>
</button>
<button mat-menu-item>
<button mat-menu-item *ngIf="node.status == 'started'">
<mat-icon>stop</mat-icon>
<span>Stop</span>
</button>