dockview-solid
Version:
Zero dependency layout manager supporting tabs, grids and splitviews
39 lines (38 loc) • 1.47 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.SolidPanelHeaderPart = void 0;
var solid_1 = require("../solid");
/**
* SolidJS implementation of ITabRenderer: mounts Solid components into panel headers.
*/
var SolidPanelHeaderPart = /** @class */ (function () {
function SolidPanelHeaderPart(id, component) {
this.id = id;
this.component = component;
this.element = document.createElement('div');
this.element.className = 'dv-solid-part';
this.element.style.height = '100%';
this.element.style.width = '100%';
}
SolidPanelHeaderPart.prototype.init = function (parameters) {
this.part = new solid_1.SolidPart(this.element, this.component, {
params: parameters.params,
api: parameters.api,
containerApi: parameters.containerApi,
tabLocation: parameters.tabLocation,
});
};
SolidPanelHeaderPart.prototype.update = function (event) {
var _a;
(_a = this.part) === null || _a === void 0 ? void 0 : _a.update({ params: event.params });
};
SolidPanelHeaderPart.prototype.layout = function (_width, _height) {
// no-op
};
SolidPanelHeaderPart.prototype.dispose = function () {
var _a;
(_a = this.part) === null || _a === void 0 ? void 0 : _a.dispose();
};
return SolidPanelHeaderPart;
}());
exports.SolidPanelHeaderPart = SolidPanelHeaderPart;