dockview
Version:
Zero dependency layout manager supporting tabs, grids and splitviews with ReactJS support
84 lines • 3.09 kB
JavaScript
;
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.DefaultGroupPanelView = void 0;
var defaultTab_1 = require("./components/tab/defaultTab");
var DefaultGroupPanelView = /** @class */ (function () {
function DefaultGroupPanelView(renderers) {
var _a;
this._content = renderers.content;
this._tab = new defaultTab_1.WrappedTab((_a = renderers.tab) !== null && _a !== void 0 ? _a : new defaultTab_1.DefaultTab());
this._actions =
renderers.actions ||
(this.content.actions
? {
element: this.content.actions,
dispose: function () {
//
},
}
: undefined);
}
Object.defineProperty(DefaultGroupPanelView.prototype, "content", {
get: function () {
return this._content;
},
enumerable: false,
configurable: true
});
Object.defineProperty(DefaultGroupPanelView.prototype, "tab", {
get: function () {
return this._tab;
},
enumerable: false,
configurable: true
});
Object.defineProperty(DefaultGroupPanelView.prototype, "actions", {
get: function () {
return this._actions;
},
enumerable: false,
configurable: true
});
DefaultGroupPanelView.prototype.init = function (params) {
this.content.init(__assign(__assign({}, params), { tab: this.tab }));
this.tab.init(params);
};
DefaultGroupPanelView.prototype.updateParentGroup = function (group, isPanelVisible) {
// TODO
};
DefaultGroupPanelView.prototype.layout = function (width, height) {
this.content.layout(width, height);
};
DefaultGroupPanelView.prototype.update = function (event) {
this.content.update(event);
this.tab.update(event);
};
DefaultGroupPanelView.prototype.toJSON = function () {
return {
content: this.content.toJSON(),
tab: this.tab.innerRenderer instanceof defaultTab_1.DefaultTab
? undefined
: this.tab.toJSON(),
};
};
DefaultGroupPanelView.prototype.dispose = function () {
var _a;
this.content.dispose();
this.tab.dispose();
(_a = this.actions) === null || _a === void 0 ? void 0 : _a.dispose();
};
return DefaultGroupPanelView;
}());
exports.DefaultGroupPanelView = DefaultGroupPanelView;
//# sourceMappingURL=defaultGroupPanelView.js.map