Skip to content

Commit

Permalink
Fixed mispositioned clearRect() in Cambiare.
Browse files Browse the repository at this point in the history
  • Loading branch information
PoneyClairDeLune committed Aug 1, 2024
1 parent abe79fe commit b9535cf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/cambiare/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -293,15 +293,15 @@ 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;
};
case "comb": {
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;
};
Expand Down
2 changes: 1 addition & 1 deletion test/css/cambiare.css
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit b9535cf

Please sign in to comment.