Links on different layer

This commit is contained in:
ziajka 2017-12-04 13:06:18 +01:00
parent 694e819274
commit 660b659f78
3 changed files with 10 additions and 12 deletions

View File

@ -1,11 +1,3 @@
export class LinkStatus {
x: number;
y: number;
status: string;
public constructor(x: number, y: number, status: string) {
this.x = x;
this.y = y;
this.status = status;
}
public constructor(public x: number, public y: number, public status: string) {}
}

View File

@ -101,8 +101,14 @@ export class LinksWidget implements Widget {
this.multiLinkCalculatorHelper.assignDataToLinks(links);
const link = view
.selectAll("g.link")
const linksLayer = view.selectAll("g.links").data([{}]);
linksLayer
.enter()
.append<SVGGElement>('g')
.attr("class", "links");
const link = linksLayer
.selectAll<SVGGElement, Link>("g.link")
.data(links.filter((l: Link) => {
return l.target && l.source;
}));

View File

@ -2,7 +2,7 @@
<span [matMenuTriggerFor]="selectInterfaceMenu"></span>
<mat-menu #selectInterfaceMenu="matMenu">
<button mat-menu-item *ngFor="let port of node.ports" (click)="chooseInterface(port)">
<mat-icon>info</mat-icon>
<mat-icon>add_circle_outline</mat-icon>
<span>{{ port.name }}</span>
</button>
</mat-menu>