1 | "use strict";
|
2 | var __extends = (this && this.__extends) || (function () {
|
3 | var extendStatics = function (d, b) {
|
4 | extendStatics = Object.setPrototypeOf ||
|
5 | ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
6 | function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
7 | return extendStatics(d, b);
|
8 | }
|
9 | return function (d, b) {
|
10 | extendStatics(d, b);
|
11 | function __() { this.constructor = d; }
|
12 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
13 | };
|
14 | })();
|
15 | Object.defineProperty(exports, "__esModule", { value: true });
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 | var signaling_1 = require("@phosphor/signaling");
|
24 | var panel_1 = require("./panel");
|
25 | var stackedlayout_1 = require("./stackedlayout");
|
26 |
|
27 |
|
28 |
|
29 |
|
30 |
|
31 |
|
32 | var StackedPanel = (function (_super) {
|
33 | __extends(StackedPanel, _super);
|
34 | |
35 |
|
36 |
|
37 |
|
38 |
|
39 | function StackedPanel(options) {
|
40 | if (options === void 0) { options = {}; }
|
41 | var _this = _super.call(this, { layout: Private.createLayout(options) }) || this;
|
42 | _this._widgetRemoved = new signaling_1.Signal(_this);
|
43 | _this.addClass('p-StackedPanel');
|
44 | return _this;
|
45 | }
|
46 | Object.defineProperty(StackedPanel.prototype, "widgetRemoved", {
|
47 | |
48 |
|
49 |
|
50 | get: function () {
|
51 | return this._widgetRemoved;
|
52 | },
|
53 | enumerable: true,
|
54 | configurable: true
|
55 | });
|
56 | |
57 |
|
58 |
|
59 | StackedPanel.prototype.onChildAdded = function (msg) {
|
60 | msg.child.addClass('p-StackedPanel-child');
|
61 | };
|
62 | |
63 |
|
64 |
|
65 | StackedPanel.prototype.onChildRemoved = function (msg) {
|
66 | msg.child.removeClass('p-StackedPanel-child');
|
67 | this._widgetRemoved.emit(msg.child);
|
68 | };
|
69 | return StackedPanel;
|
70 | }(panel_1.Panel));
|
71 | exports.StackedPanel = StackedPanel;
|
72 |
|
73 |
|
74 |
|
75 | var Private;
|
76 | (function (Private) {
|
77 | |
78 |
|
79 |
|
80 | function createLayout(options) {
|
81 | return options.layout || new stackedlayout_1.StackedLayout();
|
82 | }
|
83 | Private.createLayout = createLayout;
|
84 | })(Private || (Private = {}));
|