From 64930265d7cf00a032894e239c65890a007f2948 Mon Sep 17 00:00:00 2001 From: Mika Dede Date: Mon, 27 Sep 2021 13:48:12 +0200 Subject: [PATCH] score: fix automatic scrolling on score --- apps/score/score.app.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/score/score.app.js b/apps/score/score.app.js index 053a8df43..9f22927af 100644 --- a/apps/score/score.app.js +++ b/apps/score/score.app.js @@ -182,13 +182,16 @@ function matchScore(player) { } function score(player) { + let setFirstShownSet = function () { + firstShownSet = currentSet() - Math.floor(setsPerPage() / 2); + }; let updateCurrentSet = function (val) { cSet += val; - firstShownSet = Math.max(0, currentSet() - settings.setsPerPage + 1); + setFirstShownSet(); }; if (!matchEnded() || correctionMode) { - firstShownSet = currentSet() - Math.floor(setsPerPage() / 2); + setFirstShownSet(); } if (correctionMode) {