dockview-solid
Version:
Zero dependency layout manager supporting tabs, grids and splitviews
41 lines (40 loc) • 1.57 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.SolidPanePanelSection = void 0;
var solid_1 = require("../solid");
/**
* SolidJS implementation of pane panel section for Dockview paneview integration.
*/
var SolidPanePanelSection = /** @class */ (function () {
function SolidPanePanelSection(id, componentFn) {
this.id = id;
this.componentFn = componentFn;
this.element = document.createElement('div');
this.element.style.height = '100%';
this.element.style.width = '100%';
}
SolidPanePanelSection.prototype.init = function (parameters) {
var params = parameters.params, api = parameters.api, title = parameters.title, containerApi = parameters.containerApi;
var adaptedApi = api;
var adaptedParams = {
params: params,
api: adaptedApi,
title: title,
containerApi: containerApi,
};
this.part = new solid_1.SolidPart(this.element, this.componentFn, adaptedParams);
};
SolidPanePanelSection.prototype.toJSON = function () {
return { id: this.id };
};
SolidPanePanelSection.prototype.update = function (event) {
var _a;
(_a = this.part) === null || _a === void 0 ? void 0 : _a.update(event.params);
};
SolidPanePanelSection.prototype.dispose = function () {
var _a;
(_a = this.part) === null || _a === void 0 ? void 0 : _a.dispose();
};
return SolidPanePanelSection;
}());
exports.SolidPanePanelSection = SolidPanePanelSection;