dockview
Version:
Zero dependency layout manager supporting tabs, grids and splitviews with ReactJS support
42 lines (41 loc) • 1.16 kB
JavaScript
import { ReactPart } from '../react';
export class ReactPanelHeaderPart {
constructor(id, component, reactPortalStore) {
this.id = id;
this.component = component;
this.reactPortalStore = reactPortalStore;
this._element = document.createElement('div');
}
get element() {
return this._element;
}
focus() {
//noop
}
init(parameters) {
this.part = new ReactPart(this.element, this.reactPortalStore, this.component, {
params: parameters.params,
api: parameters.api,
containerApi: parameters.containerApi,
});
}
update(event) {
var _a;
(_a = this.part) === null || _a === void 0 ? void 0 : _a.update(event.params);
}
toJSON() {
return {
id: this.id,
};
}
layout(width, height) {
// noop - retrieval from api
}
updateParentGroup(group, isPanelVisible) {
// noop - retrieval from api
}
dispose() {
var _a;
(_a = this.part) === null || _a === void 0 ? void 0 : _a.dispose();
}
}