feat: toolbar sections as dropdown menus

Replace horizontal toolbar sections with dropdown buttons (I/O, Gates,
Components). Each opens a dropdown menu on click, keeping the toolbar
clean and compact. Dropdowns close on outside click or after selecting
a gate.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Jose Luis
2026-03-20 03:14:43 +01:00
parent 53d600fcb0
commit 2a58ad372e
4 changed files with 135 additions and 62 deletions

View File

@@ -286,6 +286,8 @@ export function updateComponentButtons() {
btn.addEventListener('click', (e) => {
e.stopPropagation();
state.placingGate = `COMPONENT:${comp.id}`;
// Close dropdown
document.querySelectorAll('.toolbar-dropdown.open').forEach(d => d.classList.remove('open'));
});
container.appendChild(btn);
});