aboutsummaryrefslogtreecommitdiffstats
path: root/src/api
diff options
context:
space:
mode:
Diffstat (limited to 'src/api')
-rw-r--r--src/api/dashboard/dashboard.html7
1 files changed, 5 insertions, 2 deletions
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,