This commit is contained in:
zadam
2020-02-07 22:19:35 +01:00
parent 47f7f5f4d9
commit 9acf723a9a
4 changed files with 4 additions and 34 deletions

View File

@@ -1,24 +1,14 @@
import BasicWidget from "./basic_widget.js";
import options from "../services/options.js";
import FlexContainer from "./flex_container.js";
export default class SidePaneContainer extends BasicWidget {
export default class SidePaneContainer extends FlexContainer {
constructor(appContext, side, widgets) {
super(appContext);
super(appContext, {id: side + '-pane', 'flex-direction': 'column', 'height': '100%'}, widgets);
this.side = side;
this.children = widgets;
}
render() {
this.$widget = $(`<div id="${this.side}-pane" style="display: flex; flex-direction: column;">`);
for (const widget of this.children) {
this.$widget.append(widget.render());
}
return this.$widget;
}
eventReceived(name, data, sync = false) {
if (options.is(this.side + 'PaneVisible')) {
super.eventReceived(name, data, sync);