From bf33537e04177dd22b6dc6777182ed241e8bdc71 Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 31 Oct 2026 20:54:02 +0100 Subject: dashboard: draw RTT near the measuring node --- src/api/dashboard/dashboard.html | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/api/dashboard/dashboard.html b/src/api/dashboard/dashboard.html index 8f0f409..f45ded3 100644 --- a/src/api/dashboard/dashboard.html +++ b/src/api/dashboard/dashboard.html @@ -647,8 +647,11 @@ function renderGraph() { descriptions.push(description); children.push(drawnLine); if (typeof line.rttMs === "number") { - // The one in use at the middle, larger; the others further along, beside theirs. - const t = line.used ? .5 : .3; + // Near the end that measured it (`a`, whose report is drawn), clear of its + // node and name, and short of the middle: the one in use larger, the others + // closer still, beside theirs. + const along = Math.min(length / 2, Math.max(36, length * .3)); + const t = (line.used ? along : Math.max(24, along * .6)) / length; const out = line.used ? -4 : Math.sign(side) * 9; const label = drawing("rtt " + key + " " + i, "text", upright({ x: p.x + (q.x - p.x) * t + ox + nx * out, -- cgit v1.3.1