From 4738673f7ffb13ab9713e75a3f1a3c8cb38b1af0 Mon Sep 17 00:00:00 2001 From: Rafostar <40623528+Rafostar@users.noreply.github.com> Date: Mon, 19 Jul 2021 12:42:54 +0200 Subject: [PATCH] Fix bottom OSD margins on multi monitors setup When player enters high resolution display, margins are being recalculated, but when it goes back dragged to some lower resolution screen they are not. This is wrong, as they should be reset back to the initial value which is zero. Fixes #102 --- src/revealers.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/revealers.js b/src/revealers.js index 75d2f6d4..ac2e077d 100644 --- a/src/revealers.js +++ b/src/revealers.js @@ -257,10 +257,9 @@ class ClapperRevealerBottom extends CustomRevealer { const maxWidth = 1720; - if(layoutWidth <= maxWidth) - return; - - const margin = (layoutWidth - maxWidth) / 2; + const margin = (layoutWidth > maxWidth) + ? (layoutWidth - maxWidth) / 2 + : 0; this.margin_start = margin; this.margin_end = margin;