1
0
Fork 0

minor tweak - track now plots smaller updates more quickly, and remembers color

master
Gordon Williams 2023-04-27 11:03:03 +01:00
parent 60948dc3f6
commit 9a7e28548f
1 changed files with 3 additions and 2 deletions

View File

@ -289,13 +289,14 @@
l = f.readLine(f);
}
var asyncTimeout;
var color = g.getColor();
function plotPartial() {
asyncTimeout = undefined;
if (l===undefined) return; // empty file?
mp = m.latLonToXY(+c[la], +c[lo]);
g.moveTo(mp.x,mp.y);
g.moveTo(mp.x,mp.y).setColor(color);
l = f.readLine(f);
var n = options.async ? 50 : 200; // only plot first 200 points to keep things fast(ish)
var n = options.async ? 20 : 200; // only plot first 200 points to keep things fast(ish)
while(l && n--) {
c = l.split(",");
if (c[la]) {