From b9535cfbc9e30783ad8cb93ec2cabd9092d92cf2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lumi=C3=A8re=20=C3=89lev=C3=A9?= <88174309+PoneyClairDeLune@users.noreply.github.com> Date: Thu, 1 Aug 2024 12:31:04 +0000 Subject: [PATCH] Fixed mispositioned `clearRect()` in Cambiare. --- src/cambiare/index.mjs | 4 ++-- test/css/cambiare.css | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cambiare/index.mjs b/src/cambiare/index.mjs index 2547281..83001d6 100644 --- a/src/cambiare/index.mjs +++ b/src/cambiare/index.mjs @@ -293,7 +293,7 @@ let Cambiare = class extends RootDisplay { let h = context.canvas.height - 1; context.fillRect(sx, 0, dx, h); if (isHeld) { - context.clearRect(sx + border, border + 1, dx - (border << 1), h - (border << 1)); + context.clearRect(sx + border, border, dx - (border << 1), h - (border << 1)); }; break; }; @@ -301,7 +301,7 @@ let Cambiare = class extends RootDisplay { let h = (isBlackKey ? Math.round((context.canvas.height << 1) / 3) : context.canvas.height) - 1; context.fillRect(sx, 0, dx, h); if (isHeld) { - context.clearRect(sx + border, border + 1, dx - (border << 1), h - (border << 1)); + context.clearRect(sx + border, border, dx - (border << 1), h - (border << 1)); }; break; }; diff --git a/test/css/cambiare.css b/test/css/cambiare.css index 32f7626..45ee724 100644 --- a/test/css/cambiare.css +++ b/test/css/cambiare.css @@ -237,7 +237,7 @@ div.cambiare-canvas > div.sect-part span.part-csplit { transform: translateY(calc(-100% - 1px)); } div.cambiare-canvas > div.sect-part span.part-csplit:nth-child(6) { - opacity: 0.8; + opacity: 1; } div.cambiare-canvas > div.sect-part span.part-cdive { transform: translateY(-1px);