mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-03-23 20:15:16 +00:00
Hide statuses when too close
This commit is contained in:
parent
1782c6c3d3
commit
ad8a064879
@ -54,10 +54,15 @@ export class LinksWidget implements Widget {
|
||||
const start_point: SVGPoint = link_path.node().getPointAtLength(40);
|
||||
const end_point: SVGPoint = link_path.node().getPointAtLength(link_path.node().getTotalLength() - 40);
|
||||
|
||||
const statuses = [
|
||||
new LinkStatus(start_point.x, start_point.y, l.source.status),
|
||||
new LinkStatus(end_point.x, end_point.y, l.target.status)
|
||||
];
|
||||
let statuses = [];
|
||||
|
||||
if (link_path.node().getTotalLength() > 2 * 40 + 10) {
|
||||
statuses = [
|
||||
new LinkStatus(start_point.x, start_point.y, l.source.status),
|
||||
new LinkStatus(end_point.x, end_point.y, l.target.status)
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
const status_started = link_group
|
||||
.selectAll<SVGCircleElement, LinkStatus>('circle.status_started')
|
||||
|
Loading…
x
Reference in New Issue
Block a user