Update interface-status.ts

This commit is contained in:
Piotr Pekala 2020-01-03 02:12:51 -08:00
parent 67aaaa8b2a
commit 50e2c02f93

View File

@ -22,12 +22,14 @@ export class InterfaceStatusWidget implements Widget {
const end_point: SVGPoint = link_path.node().getPointAtLength(link_path.node().getTotalLength() - 45); const end_point: SVGPoint = link_path.node().getPointAtLength(link_path.node().getTotalLength() - 45);
if (link_path.node().getTotalLength() > 2 * 45 + 10) { if (link_path.node().getTotalLength() > 2 * 45 + 10) {
if (l.source && l.target) {
statuses = [ statuses = [
new LinkStatus(start_point.x, start_point.y, (l.capturing && l.suspend) ? 'suspended' : l.source.status), new LinkStatus(start_point.x, start_point.y, (l.capturing && l.suspend) ? 'suspended' : l.source.status),
new LinkStatus(end_point.x, end_point.y, (l.capturing && l.suspend) ? 'suspended' : l.target.status) new LinkStatus(end_point.x, end_point.y, (l.capturing && l.suspend) ? 'suspended' : l.target.status)
]; ];
} }
} }
}
const status_started = link_group const status_started = link_group
.selectAll<SVGCircleElement, LinkStatus>('circle.status_started') .selectAll<SVGCircleElement, LinkStatus>('circle.status_started')