From 98de6f70b8d50b695b343bdbaf14c9023ba27286 Mon Sep 17 00:00:00 2001 From: Brian Cully Date: Mon, 28 Jul 2025 11:37:07 -0400 Subject: fix string selection update on click --- string.mjs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'string.mjs') diff --git a/string.mjs b/string.mjs index cf9b759..39a3533 100644 --- a/string.mjs +++ b/string.mjs @@ -53,6 +53,12 @@ export default class extends HTMLElement { }) } + updateSelected() { + this.querySelectorAll('.selected').forEach(s => { + s.innerText = this.getAttribute('value'); + }); + } + muteClicked(e) { console.debug('String#muteClicked', this, e); if (this.getAttribute('value') !== 'x') { @@ -69,6 +75,7 @@ export default class extends HTMLElement { console.debug(' -- note', e.target.note); this.setAttribute('value', e.target.getAttribute('value')); this.setAttribute('octave', e.target.getAttribute('octave')); + this.updateSelected(); } render() { -- cgit v1.3