X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=www%2Fjs%2Fremoteglot.js;h=c3de366309a6c6cd60289b551e4576515e531a7d;hb=4d96249116cab3219f4a36fd9bc97ac42dbf574b;hp=b0c89cb750a8e179a0e87b03132da53fec7db000;hpb=cf799b6a08f1986df68e7921aab5fe63ff763b7b;p=remoteglot diff --git a/www/js/remoteglot.js b/www/js/remoteglot.js index b0c89cb..c3de366 100644 --- a/www/js/remoteglot.js +++ b/www/js/remoteglot.js @@ -1408,6 +1408,13 @@ let update_sparkline = function(data) { if (score < min_score) min_score = score; if (score > max_score) max_score = score; } + if (max_score - min_score < 100) { + if (Math.abs(max_score) >= Math.abs(min_score)) { + max_score = min_score + 100; + } else { + min_score = max_score - 100; + } + } const h = scorespark.getBoundingClientRect().height;