Skip to content

Commit 6af5451

Browse files
authored
Merge branch 'testing' into testing
2 parents d7705dd + c2e45f9 commit 6af5451

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

js/tracker.js

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1061,7 +1061,9 @@ function sidebar_update() {
10611061
if (map.getBounds().contains(vehicles[serial].marker.getLatLng())) {
10621062
$("#main .vehicle"+vehicles[serial].uuid).show();
10631063
} else {
1064-
$("#main .vehicle"+vehicles[serial].uuid).hide();
1064+
if (!($("#main .vehicle"+vehicles[serial].uuid).hasClass("follow"))) {
1065+
$("#main .vehicle"+vehicles[serial].uuid).hide();
1066+
}
10651067
}
10661068
}
10671069
} else {
@@ -3489,7 +3491,7 @@ function refresh() {
34893491
refreshSingle(wvar.query);
34903492
} else {
34913493
response = formatData(data, false);
3492-
update(response);
3494+
update(response, true);
34933495
$("#stTimer").attr("data-timestamp", response.fetch_timestamp);
34943496
}
34953497
$("#stText").text("");
@@ -3617,7 +3619,7 @@ function refreshSingle(serial) {
36173619
dataType: "json",
36183620
success: function(data, textStatus) {
36193621
response = formatData(data, false);
3620-
update(response);
3622+
update(response, true);
36213623
singleRecovery(serial);
36223624
$("#stText").text("");
36233625
},
@@ -3659,7 +3661,7 @@ function refreshSingleNew(serial) {
36593661
dataType: "json",
36603662
success: function(data, textStatus) {
36613663
response = formatData(data, false);
3662-
update(response);
3664+
update(response, true);
36633665
},
36643666
error: function() {
36653667
ajax_inprogress_single_new = false;
@@ -4374,14 +4376,16 @@ var ssdv = {};
43744376
var status = "";
43754377
var bs_idx = 0;
43764378

4377-
function update(response) {
4379+
function update(response, none) {
43784380
if (response === null ||
43794381
!response.positions ||
43804382
!response.positions.position ||
43814383
!response.positions.position.length) {
43824384

43834385
// if no vehicles are found, this will remove the spinner and put a friendly message
4384-
$("#main .empty").html("<span>No vehicles :(</span>");
4386+
if (none) {
4387+
$("#main .empty").html("<span>No vehicles :(</span>");
4388+
}
43854389

43864390
return;
43874391
}

0 commit comments

Comments
 (0)