diff options
| author | skal <pascal.massimino@gmail.com> | 2026-02-18 19:48:51 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-02-18 19:48:51 +0100 |
| commit | 04756e1c595c8c8391b1d6f2ee47dc34a6642c39 (patch) | |
| tree | d09ea6753164ec2ca3f8f53c8a0304f7a5288bcb /tools/mq_editor/app.js | |
| parent | eff75e6d15eaebccec814b37504a6eeff53fb9e8 (diff) | |
refactor(mq_editor): extract CSS to style.css, consolidate UI params
- Move all styles from index.html <style> block to style.css
- Merge duplicate :focus rules; add canvas-col, canvas-wrap, amp-edit-header, slider-val classes
- Move params (Hop/Threshold/Prominence/Birth/Death/Phase Wt/Min Len) into ⚙ Params dropdown
- Relocate Keep slider to bottom-left canvas overlay
handoff(Claude): UI consolidation complete
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'tools/mq_editor/app.js')
| -rw-r--r-- | tools/mq_editor/app.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tools/mq_editor/app.js b/tools/mq_editor/app.js index 59849da..20224a0 100644 --- a/tools/mq_editor/app.js +++ b/tools/mq_editor/app.js @@ -17,6 +17,23 @@ function fmtHz(f) { } function getSR() { return (typeof audioBuffer !== 'undefined' && audioBuffer) ? audioBuffer.sampleRate : 44100; } +// Params dropdown toggle +(function() { + const btn = document.getElementById('paramsBtn'); + const panel = document.getElementById('paramsPanel'); + btn.addEventListener('click', (e) => { + e.stopPropagation(); + const open = panel.classList.toggle('open'); + btn.classList.toggle('params-open', open); + }); + document.addEventListener('click', (e) => { + if (!panel.contains(e.target) && e.target !== btn) { + panel.classList.remove('open'); + btn.classList.remove('params-open'); + } + }); +})(); + // LP/HP slider live display document.getElementById('lpK1').addEventListener('input', function() { const k = parseFloat(this.value); |
