mirror of
https://github.com/zadam/trilium.git
synced 2025-12-22 08:09:55 +01:00
fixes
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user