1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 | "use strict";
|
8 | Object.defineProperty(exports, "__esModule", { value: true });
|
9 | var 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 | }());
|
40 | exports.VerticalStack = VerticalStack;
|