Fix showing initial active users

This commit is contained in:
Maxim Baz 2020-11-08 14:16:49 +01:00
parent 899e525844
commit 8ada63b85e
No known key found for this signature in database
GPG key ID: 011FDC52DA839335

View file

@ -682,7 +682,6 @@ function processUpdate(data, init) {
// Get the last location received.
var lastPoint = shares[user].points.length > 0 ? shares[user].points[shares[user].points.length - 1] : null;
if (lastPoint !== null) shares[user].listEntry.style.display = "block";
for (var i = 0; i < users[user].length; i++) {
var lat = users[user][i][0];
@ -744,6 +743,8 @@ function processUpdate(data, init) {
}
}
if (lastPoint !== null) shares[user].listEntry.style.display = "block";
var eVelocity = document.getElementById("velocity-" + shares[user].id)
var vel = 0;
if (lastPoint !== null && lastPoint.spd !== null && eVelocity !== null) {