Update ethernet-link.ts

This commit is contained in:
piotrpekala7 2021-06-17 14:45:05 +02:00 committed by grossmj
parent 66cd41018e
commit a8043f9423

View File

@ -46,24 +46,15 @@ export class EthernetLinkWidget implements Widget {
let link: MapLink = (datum as unknown) as MapLink; let link: MapLink = (datum as unknown) as MapLink;
const evt = event; const evt = event;
this.onContextMenu.emit(new LinkContextMenu(evt, link)); this.onContextMenu.emit(new LinkContextMenu(evt, link));
}); })
link_enter
.attr('stroke', (datum) => { .attr('stroke', (datum) => {
let link: MapLink = (datum as unknown) as MapLink;
return datum.style.color; return datum.style.color;
}) })
.attr('stroke-width', (datum) => { .attr('stroke-width', (datum) => {
let link: MapLink = (datum as unknown) as MapLink;
return datum.style.width; return datum.style.width;
}) })
.attr('stroke-dasharray', (datum) => { .attr('stroke-dasharray', (datum) => {
return StyleTranslator.getLinkStyle(datum.style); return StyleTranslator.getLinkStyle(datum.style);
})
.on('contextmenu', (datum) => {
let link: MapLink = (datum as unknown) as MapLink;
const evt = event;
this.onContextMenu.emit(new LinkContextMenu(evt, link));
}); });
const link_merge = link.merge(link_enter); const link_merge = link.merge(link_enter);