From: Steinar H. Gunderson Date: Fri, 23 Dec 2022 23:39:57 +0000 (+0100) Subject: Fix min/max range for the most recent move. X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=730a492638bd85b0c319cef330c626292ef83b59;hp=9dd737c8851cf2706b4823dc886e1311854ede64;p=remoteglot Fix min/max range for the most recent move. --- 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;