diff options
| author | Brian Cully <bjc@spork.org> | 2025-07-28 11:37:07 -0400 |
|---|---|---|
| committer | Brian Cully <bjc@spork.org> | 2025-07-28 11:37:07 -0400 |
| commit | 98de6f70b8d50b695b343bdbaf14c9023ba27286 (patch) | |
| tree | 4aaf3fb8876e7ad96dbe02999a4c6ac15ebe60c2 /string.mjs | |
| parent | 82e797c8b303393aa7d0b16787ec353b520dec44 (diff) | |
| download | chords-98de6f70b8d50b695b343bdbaf14c9023ba27286.tar.gz chords-98de6f70b8d50b695b343bdbaf14c9023ba27286.zip | |
fix string selection update on click
Diffstat (limited to 'string.mjs')
| -rw-r--r-- | string.mjs | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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() { |
