Merge pull request #158 from maximbaz/fix-showing-initial-active-users

Fix showing initial active users
This commit is contained in:
Marius Lindvall 2020-11-12 11:08:26 +01:00 committed by GitHub
commit bc2e9fdcce
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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) {