Skip to content

Commit dc6a7c3

Browse files
authored
Merge pull request #189 from LukePrior/testing
Stop page from freezing during population of sondes
2 parents be96d09 + a845afc commit dc6a7c3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

js/tracker.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4458,15 +4458,15 @@ function update(response) {
44584458
ctx.idx = max;
44594459

44604460
if(ctx.idx < ctx.max) {
4461-
ctx.step(ctx);
4461+
setTimeout(function() { ctx.step(ctx); }, 4);
44624462
} else {
44634463
ctx.list = Object.keys(vehicles);
4464-
ctx.draw(ctx);
4464+
setTimeout(function() { ctx.draw(ctx); }, 16);
44654465
}
44664466
},
44674467
draw: function(ctx) {
44684468
if(ctx.list.length < 1) {
4469-
ctx.end(ctx);
4469+
setTimeout(function() { ctx.end(ctx); }, 16);
44704470
return;
44714471
}
44724472

@@ -4493,7 +4493,7 @@ function update(response) {
44934493
}
44944494

44954495
// step to the next callsign
4496-
ctx.draw(ctx);
4496+
setTimeout(function() { ctx.draw(ctx); }, 16);
44974497
},
44984498
end: function(ctx) {
44994499

0 commit comments

Comments
 (0)