Skip to content

Commit a512552

Browse files
Merge branch 'feature-lookangles'
* feature-lookangles: when range in km, show up to 1 decimal point
2 parents 58bcd49 + 4a4004e commit a512552

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

js/tracker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ function update_lookangles(idx) {
147147
$("#lookanglesbox .bearing").text(look.bearing);
148148
$("#lookanglesbox .elevation").text("Elevation: " + Math.round(look.elevation * 10000)/10000 + "°");
149149

150-
var range_string = (look.range < 10000) ? Math.round(look.range) + "m" : Math.round(look.range/1000) + " km";
150+
var range_string = (look.range < 10000) ? Math.round(look.range) + "m" : (Math.round(look.range/100)/10) + " km";
151151
$("#lookanglesbox .range").text(range_string);
152152

153153
}

0 commit comments

Comments
 (0)