mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-06-19 15:23:51 +00:00
Hide statuses when too close
This commit is contained in:
@ -54,10 +54,15 @@ export class LinksWidget implements Widget {
|
|||||||
const start_point: SVGPoint = link_path.node().getPointAtLength(40);
|
const start_point: SVGPoint = link_path.node().getPointAtLength(40);
|
||||||
const end_point: SVGPoint = link_path.node().getPointAtLength(link_path.node().getTotalLength() - 40);
|
const end_point: SVGPoint = link_path.node().getPointAtLength(link_path.node().getTotalLength() - 40);
|
||||||
|
|
||||||
const statuses = [
|
let statuses = [];
|
||||||
|
|
||||||
|
if (link_path.node().getTotalLength() > 2 * 40 + 10) {
|
||||||
|
statuses = [
|
||||||
new LinkStatus(start_point.x, start_point.y, l.source.status),
|
new LinkStatus(start_point.x, start_point.y, l.source.status),
|
||||||
new LinkStatus(end_point.x, end_point.y, l.target.status)
|
new LinkStatus(end_point.x, end_point.y, 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')
|
||||||
|
Reference in New Issue
Block a user