Notes/src/public/app/widgets/side_pane_container.js

25 lines
608 B
JavaScript
Raw Normal View History

import options from "../services/options.js";
2020-02-07 22:19:35 +01:00
import FlexContainer from "./flex_container.js";
2020-02-07 22:19:35 +01:00
export default class SidePaneContainer extends FlexContainer {
2020-02-27 10:03:14 +01:00
constructor(side) {
super('column');
this.side = side;
2020-02-27 10:03:14 +01:00
this.id(side + '-pane');
this.css('height', '100%');
}
isEnabled() {
return super.isEnabled() && options.is(this.side + 'PaneVisible');
}
2020-02-16 19:23:49 +01:00
sidebarVisibilityChangedEvent({side, show}) {
this.toggleInt(this.isEnabled());
2020-03-01 20:11:40 +01:00
if (this.side === side && show) {
2020-02-16 19:21:17 +01:00
this.handleEvent('lazyLoaded');
}
}
}