Skip to content

Commit 02e7921

Browse files
authored
Update piemenus.js
1 parent d2d2a56 commit 02e7921

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

js/piemenus.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -634,14 +634,19 @@ const piemenuPitches = (
634634

635635
// Update the block's displayed text with the note and accidental
636636
if (selectedAccidental === "♮" || selectedAccidental === "") {
637-
that.text.text = selectedNote; // Natural or no accidental
637+
// Natural or no accidental: display only the note
638+
that.text.text = selectedNote;
638639
} else {
639-
that.text.text = selectedNote + selectedAccidental; // Combine note and accidental
640+
// Combine note and accidental for display
641+
that.text.text = selectedNote + selectedAccidental;
640642
}
641643
// Update the block value and refresh the cache
642644
that.value = selectedNote + (selectedAccidental === "♮" ? "" : selectedAccidental);
645+
// Ensure proper layering of the text element
643646
that.container.setChildIndex(that.text, that.container.children.length - 1);
647+
// Refresh the block's cache
644648
that.updateCache();
649+
// Hide the pie menu and remove the wheels
645650
docById("wheelDiv").style.display = "none";
646651
that._pitchWheel.removeWheel();
647652
if (!custom) {

0 commit comments

Comments
 (0)