]> git.sesse.net Git - remoteglot/commitdiff
Revert "Show retained/interpolated scores with 50% alpha."
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 26 Dec 2022 14:07:51 +0000 (15:07 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 26 Dec 2022 14:07:51 +0000 (15:07 +0100)
A bit too distracting.

This reverts commit b3aae4b92383a29a31b7c9557655efc45922c3ad.

www/js/remoteglot.js

index 1b905a34949de7b67e9b46ffdd19ac710c764fda..b0c89cb750a8e179a0e87b03132da53fec7db000 100644 (file)
@@ -1393,16 +1393,12 @@ let update_sparkline = function(data) {
                        let max_score = 1;
                        let last_score = null;
                        let scores = [];
-                       let scores_missing = [];
                        for (let halfmove_num = first_move_num; halfmove_num <= last_move_num; ++halfmove_num) {
                                if (data['score_history'][halfmove_num]) {
                                        let score = compute_plot_score(data['score_history'][halfmove_num]);
                                        last_score = score;
                                        if (score < min_score) min_score = score;
                                        if (score > max_score) max_score = score;
-                                       scores_missing.push(false);
-                               } else {
-                                       scores_missing.push(true);
                                }
                                scores.push(last_score);
                        }
@@ -1448,8 +1444,7 @@ let update_sparkline = function(data) {
                                        hlcolor[1] = Math.min(hlcolor[1] * 1.4, 1.0);
                                        hlcolor[2] = Math.min(hlcolor[2] * 1.4, 1.0);
                                }
-                               let alpha = scores_missing[i] ? 50 : 100;
-                               rect.style.fill = 'rgba(' + color[0]*100.0 + '%, ' + color[1]*100.0 + '%, ' + color[2]*100.0 + '%, ' + alpha + '%)';
+                               rect.style.fill = 'rgb(' + color[0]*100.0 + '%, ' + color[1]*100.0 + '%, ' + color[2]*100.0 + '%)';
 
                                // score_history contains the Nth _position_, but format_tooltip
                                // wants to format the Nth _move_; thus the -1.