Skip to content

Commit

Permalink
fix CSS error on keyboard
Browse files Browse the repository at this point in the history
  • Loading branch information
spessasus committed Jan 1, 2025
1 parent ebfe696 commit 7b5e5e1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/website/js/midi_keyboard/midi_keyboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -488,10 +488,11 @@ class MidiKeyboard
return;
}
pressedColors.splice(colorIndex, 1);
key.style.background = pressedColors[pressedColors.length - 1] || "";
if (this.mode === "dark")
const color = pressedColors[pressedColors.length - 1] || "";
key.style.background = color;
if (this.mode === "dark" && color !== "")
{
key.style.boxShadow = `0px 0px ${GLOW_PX}px ${pressedColors[pressedColors.length - 1]}`;
key.style.boxShadow = `0px 0px ${GLOW_PX}px ${color}`;
}
if (pressedColors.length < 1)
{
Expand Down

0 comments on commit 7b5e5e1

Please sign in to comment.