summaryrefslogtreecommitdiffstats
path: root/main.mjs
diff options
context:
space:
mode:
authorBrian Cully <bjc@spork.org>2025-05-12 21:52:00 -0400
committerBrian Cully <bjc@spork.org>2025-05-12 21:52:00 -0400
commitceff45422d39530b09d3d797ef88b97190c4f23c (patch)
treed3e6387bef8bd19d6eccdb750c67a407b296fcc4 /main.mjs
parentd1c8f67d699fcd5e4ce262688b89503d3ddc0f88 (diff)
downloadchords-ceff45422d39530b09d3d797ef88b97190c4f23c.tar.gz
chords-ceff45422d39530b09d3d797ef88b97190c4f23c.zip
wip: major refactor for web components and grid layout
- hovering on notes from the key doesn't work. - need to show fret on/off, not notes, they're too distracting - save button broken
Diffstat (limited to 'main.mjs')
-rw-r--r--main.mjs17
1 files changed, 6 insertions, 11 deletions
diff --git a/main.mjs b/main.mjs
index 5f49097..4108f5d 100644
--- a/main.mjs
+++ b/main.mjs
@@ -1,20 +1,15 @@
-import Fretboard, { fretToNote } from './fretboard.mjs';
-import KeyPicker from './key-picker.mjs';
+import Fretboard from './fretboard.mjs';
import History from './history.mjs';
-
-function notes(form) {
- const strings = ['string1', 'string2', 'string3', 'string4', 'string5', 'string6'];
- const formData = new FormData(form);
- console.debug('notes', form, formData);
- return strings.map((klass) => fretToNote(form, klass, formData.get(klass)));
-}
+import KeyPicker from './key-picker.mjs';
+import String from './string.mjs';
function init() {
console.debug('init()', this);
+ String.register();
Fretboard.register();
- KeyPicker.register();
- History.register();
+ // KeyPicker.register();
+ // History.register();
// todo: maybe just attach the listener to document?
document.querySelectorAll(Fretboard.name).forEach(f => {