server.js: properly respect maxpoints

master
Nicolò Balzarotti 2023-02-21 14:00:43 +01:00
parent 6cfa299371
commit 7c6c2fdc85
1 changed files with 1 additions and 1 deletions

2
dist/server.js vendored
View File

@ -77,7 +77,7 @@ function add_plot_data(newpoints, render=true) {
}
plot_data[key].x.push(point[1]);
plot_data[key].y.push(point[2]);
if (plot_data[key].x.length > localstate.maxpoints) {
while (plot_data[key].x.length > localstate.maxpoints) {
plot_data[key].x.shift();
plot_data[key].y.shift();
}