diff --git a/history.html b/history.html
index f3786fd..96d246b 100644
--- a/history.html
+++ b/history.html
@@ -96,7 +96,7 @@
width: 100%;
}
- #lists td:nth-child(2) {
+ #lists td:not(:first-child) {
text-align: right;
}
diff --git a/history.js b/history.js
index 4bd8e28..2236a03 100644
--- a/history.js
+++ b/history.js
@@ -151,7 +151,7 @@ function handle_data(map) {
longlinks = graph.slice().sort( function (a, b) {
return a.distance - b.distance
- }).reverse().slice(0, 10)
+ }).reverse().slice(0, Math.ceil(0.1 * graph.length))
addToLongLinksList(document.getElementById("longlinks"), longlinks)
@@ -163,6 +163,14 @@ function showDistance(d) {
return (new Intl.NumberFormat("de-DE", {maximumFractionDigits: 0}).format(d.distance)) + " m"
}
+function showTq(d) {
+ var opts = { maximumFractionDigits: 2,
+ minimumFractionDigits: 2
+ }
+
+ return (new Intl.NumberFormat("de-DE", opts).format(d.tq)) + " TQ"
+}
+
function mkmap(map, newnodes, lostnodes, onlinenodes, graph) {
L.control.zoom({ position: "topright" }).addTo(map)
@@ -242,6 +250,10 @@ function addToLongLinksList(el, links) {
td2.textContent = showDistance(d)
row.appendChild(td2)
+ var td3 = document.createElement("td")
+ td3.textContent = showTq(d)
+ row.appendChild(td3)
+
el.appendChild(row)
})
}