From 730a492638bd85b0c319cef330c626292ef83b59 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sat, 24 Dec 2022 00:39:57 +0100 Subject: [PATCH] Fix min/max range for the most recent move. --- www/js/remoteglot.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/www/js/remoteglot.js b/www/js/remoteglot.js index c96335f..59d9412 100644 --- a/www/js/remoteglot.js +++ b/www/js/remoteglot.js @@ -1395,7 +1395,10 @@ let update_sparkline = function(data) { scores.push(last_score); } if (data['score']) { - scores.push(compute_plot_score(data['score'])); + let score = compute_plot_score(data['score']); + scores.push(score); + if (score < min_score) min_score = score; + if (score > max_score) max_score = score; } const h = scorespark.getBoundingClientRect().height; -- 2.39.2