Update doalles.js - added color coding

added color coding to indicate large best-tle-dist -values. Bright red for 10000+ km and light red for 1000+ km.
pull/65/head
nousian 2020-01-02 17:33:37 +02:00 committed by GitHub
parent ef8cc9538d
commit 87fde7ea1a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 3 deletions

View File

@ -88,18 +88,22 @@ function maketable(str, arr)
ret.value="";
}
else if(row[column] != null && (column == "delta_hz_corr" || column =="delta_hz")) {
ret.value = row[column];
}
else if((column == "tle-dist")) {
if(row["best-tle-dist"] != null)
if(row["best-tle-dist"] != null) {
ret.value = row["best-tle-dist"].toFixed(1) + " km";
if (Math.abs(row["best-tle-dist"]) > 10000)
ret.color="red";
else if (Math.abs(row["best-tle-dist"]) > 1000)
ret.color="#ffaaaa";
}
}
else if((column == "alma-dist")) {
if(row["alma-dist"] != null)
ret.value = row["alma-dist"].toFixed(1) + " km";
}
else if(column == "norad") {
ret.value = row["best-tle-norad"];
}