UNPKG

1.22 kBJavaScriptView Raw
1/**
2 * ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
3 * @version v18.1.2
4 * @link http://www.ag-grid.com/
5 * @license MIT
6 */
7"use strict";
8Object.defineProperty(exports, "__esModule", { value: true });
9var VerticalStack = (function () {
10 function VerticalStack() {
11 this.isLayoutPanel = true;
12 this.childPanels = [];
13 this.eGui = document.createElement('div');
14 this.eGui.style.height = '100%';
15 }
16 VerticalStack.prototype.addPanel = function (panel, height) {
17 var component;
18 if (panel.isLayoutPanel) {
19 this.childPanels.push(panel);
20 component = panel.getGui();
21 }
22 else {
23 component = panel;
24 }
25 if (height) {
26 component.style.height = height;
27 }
28 this.eGui.appendChild(component);
29 };
30 VerticalStack.prototype.getGui = function () {
31 return this.eGui;
32 };
33 VerticalStack.prototype.doLayout = function () {
34 for (var i = 0; i < this.childPanels.length; i++) {
35 this.childPanels[i].doLayout();
36 }
37 };
38 return VerticalStack;
39}());
40exports.VerticalStack = VerticalStack;