import options from "../services/options.js"; import FlexContainer from "./flex_container.js"; export default class SidePaneContainer extends FlexContainer { constructor(appContext, side, widgets) { super(appContext, {id: side + '-pane', 'flex-direction': 'column', 'height': '100%'}, widgets); this.side = side; this.children = widgets; } isEnabled() { return super.isEnabled() && options.is(this.side + 'PaneVisible'); } eventReceived(name, data) { if (options.is(this.side + 'PaneVisible')) { super.eventReceived(name, data); } } sidebarVisibilityChangedListener({side, show}) { if (this.side === side) { this.toggle(show); this.eventReceived('lazyLoaded'); } } }