import {TOOLBAR_GROUP_CLASSNAME, WIDE_CLASSNAME} from './config.js'; export class ToolbarGroup { sim = undefined; toolbars = []; constructor(sim) { this.sim = sim; this.div = document.createElement('div'); this.sim.div.appendChild(this.div); this.div.classList.add(TOOLBAR_GROUP_CLASSNAME); } topRight() { this.div.style.position = 'fixed'; this.div.style.top = '0px'; this.div.style.right = '0px'; return this; } wide() { this.div.classList.add(WIDE_CLASSNAME); return this; } addToolbar(toolbar) { this.div.appendChild(toolbar.div); this.toolbars.push(toolbar); return this; } applyExpanded() { for (const toolbar of this.toolbars) { toolbar.applyExpanded(); } } frame() { for (const toolbar of this.toolbars) { toolbar.frame(); } } }