Skip to content

Commit d2f7608

Browse files
fix infobox autopan map + style tweaks
1 parent 937009e commit d2f7608

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

js/tracker.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1167,10 +1167,11 @@ var mapInfoBox_handle_path_fetch = function(id,vehicle) {
11671167

11681168
div = document.createElement('div');
11691169

1170-
html = "<div style='white-space: nowrap'>";
1170+
html = "<div style='white-space: nowrap;line-height:16px'>";
11711171
html += "<img style='position:absolute;top:-46px;left:-35px;width:46px;height:84px' src='"+vehicle.image_src+"' />";
1172-
html += "<div>"+data.vehicle+"<span style='float:right'>("+data.position_id+")</span></div><hr style='margin:0'>";
1173-
html += "<div><b><i class='icon-location'></i>&nbsp;</b>"+roundNumber(data.gps_lat, 6) + ',&nbsp;' + roundNumber(data.gps_lon, 6)+"</div>";
1172+
html += "<div>"+data.vehicle+"<span style='position:absolute;right:0px;'>("+data.position_id+")</span></div>";
1173+
html += "<hr style='margin:5px 0px'>";
1174+
html += "<div style='margin-bottom:5px;'><b><i class='icon-location'></i>&nbsp;</b>"+roundNumber(data.gps_lat, 6) + ',&nbsp;' + roundNumber(data.gps_lon, 6)+"</div>";
11741175

11751176
var imp = offline.get('opt_imperial');
11761177
var text_alt = Number((imp) ? Math.floor(3.2808399 * parseInt(data.gps_alt)) : parseInt(data.gps_alt)).toLocaleString("us");
@@ -1193,16 +1194,17 @@ var mapInfoBox_handle_path_fetch = function(id,vehicle) {
11931194
html += "<div><b>Duration:&nbsp;</b>" + format_time_friendly(vehicle.start_time, convert_time(vehicle.curr_position.gps_time)) + "</div>";
11941195

11951196
if(Object.keys(JSON.parse(data.data)).length) {
1196-
html += "<hr style='margin:0'>";
1197+
html += "<hr style='margin:5px 0px'>";
11971198
html += habitat_data(data.data, true);
11981199
}
11991200

1200-
html += "<hr style='margin:0'>";
1201-
html += "<div style='font-size:11px;'><b>Callsign(s):&nbsp;</b>"+data.callsign.replace(/,/g,', ')+"</div>";
1201+
html += "<hr style='margin:0px;margin-top:5px'>";
1202+
html += "<div style='font-size:11px;'><b>Received by:&nbsp;</b>"+data.callsign.replace(/,/g,', ')+"</div>";
12021203

12031204
div.innerHTML = html;
12041205

12051206
mapInfoBox.setContent(div);
1207+
mapInfoBox.open(map);
12061208

12071209
setTimeout(function() {
12081210
div.parentElement.style.overflow = "";

0 commit comments

Comments
 (0)