@jupyterlab/apputils 0.19.1-alpha.0 → 0.19.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +34 -0
- package/lib/clientsession.d.ts +443 -443
- package/lib/clientsession.js +883 -883
- package/lib/clipboard.d.ts +33 -33
- package/lib/clipboard.js +88 -88
- package/lib/commandlinker.d.ts +121 -121
- package/lib/commandlinker.js +175 -175
- package/lib/commandpalette.d.ts +33 -33
- package/lib/commandpalette.js +12 -12
- package/lib/dialog.d.ts +357 -357
- package/lib/dialog.js +540 -540
- package/lib/domutils.d.ts +13 -13
- package/lib/domutils.js +28 -28
- package/lib/hoverbox.d.ts +82 -82
- package/lib/hoverbox.js +101 -101
- package/lib/iframe.d.ts +14 -14
- package/lib/iframe.js +45 -45
- package/lib/index.d.ts +19 -19
- package/lib/index.js +26 -26
- package/lib/instancetracker.d.ts +278 -278
- package/lib/instancetracker.js +318 -318
- package/lib/mainareawidget.d.ts +108 -108
- package/lib/mainareawidget.js +184 -184
- package/lib/sanitizer.d.ts +44 -44
- package/lib/sanitizer.js +913 -913
- package/lib/spinner.d.ts +15 -15
- package/lib/spinner.js +30 -30
- package/lib/splash.d.ts +19 -19
- package/lib/splash.js +10 -10
- package/lib/styling.d.ts +27 -27
- package/lib/styling.js +92 -92
- package/lib/thememanager.d.ts +141 -141
- package/lib/thememanager.js +238 -238
- package/lib/toolbar.d.ts +178 -178
- package/lib/toolbar.js +515 -515
- package/lib/vdom.d.ts +90 -90
- package/lib/vdom.js +130 -130
- package/lib/windowresolver.d.ts +37 -37
- package/lib/windowresolver.js +173 -173
- package/package.json +9 -6
package/lib/thememanager.js
CHANGED
|
@@ -1,238 +1,238 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Copyright (c) Jupyter Development Team.
|
|
3
|
-
// Distributed under the terms of the Modified BSD License.
|
|
4
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
const coreutils_1 = require("@jupyterlab/coreutils");
|
|
6
|
-
const algorithm_1 = require("@phosphor/algorithm");
|
|
7
|
-
const coreutils_2 = require("@phosphor/coreutils");
|
|
8
|
-
const disposable_1 = require("@phosphor/disposable");
|
|
9
|
-
const signaling_1 = require("@phosphor/signaling");
|
|
10
|
-
const dialog_1 = require("./dialog");
|
|
11
|
-
/* tslint:disable */
|
|
12
|
-
/**
|
|
13
|
-
* The theme manager token.
|
|
14
|
-
*/
|
|
15
|
-
exports.IThemeManager = new coreutils_2.Token('@jupyterlab/apputils:IThemeManager');
|
|
16
|
-
/**
|
|
17
|
-
* The number of milliseconds between theme loading attempts.
|
|
18
|
-
*/
|
|
19
|
-
const REQUEST_INTERVAL = 75;
|
|
20
|
-
/**
|
|
21
|
-
* The number of times to attempt to load a theme before giving up.
|
|
22
|
-
*/
|
|
23
|
-
const REQUEST_THRESHOLD = 20;
|
|
24
|
-
/**
|
|
25
|
-
* A class that provides theme management.
|
|
26
|
-
*/
|
|
27
|
-
class ThemeManager {
|
|
28
|
-
/**
|
|
29
|
-
* Construct a new theme manager.
|
|
30
|
-
*/
|
|
31
|
-
constructor(options) {
|
|
32
|
-
this._current = null;
|
|
33
|
-
this._links = [];
|
|
34
|
-
this._outstanding = null;
|
|
35
|
-
this._pending = 0;
|
|
36
|
-
this._requests = {};
|
|
37
|
-
this._themes = {};
|
|
38
|
-
this._themeChanged = new signaling_1.Signal(this);
|
|
39
|
-
const { host, key, splash, url } = options;
|
|
40
|
-
const registry = options.settings;
|
|
41
|
-
this._base = url;
|
|
42
|
-
this._host = host;
|
|
43
|
-
this._splash = splash;
|
|
44
|
-
registry.load(key).then(settings => {
|
|
45
|
-
this._settings = settings;
|
|
46
|
-
this._settings.changed.connect(this._loadSettings, this);
|
|
47
|
-
this._loadSettings();
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Get the name of the current theme.
|
|
52
|
-
*/
|
|
53
|
-
get theme() {
|
|
54
|
-
return this._current;
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* The names of the registered themes.
|
|
58
|
-
*/
|
|
59
|
-
get themes() {
|
|
60
|
-
return Object.keys(this._themes);
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* A signal fired when the application theme changes.
|
|
64
|
-
*/
|
|
65
|
-
get themeChanged() {
|
|
66
|
-
return this._themeChanged;
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* Load a theme CSS file by path.
|
|
70
|
-
*
|
|
71
|
-
* @param path - The path of the file to load.
|
|
72
|
-
*/
|
|
73
|
-
loadCSS(path) {
|
|
74
|
-
const base = this._base;
|
|
75
|
-
const href = coreutils_1.URLExt.isLocal(path) ? coreutils_1.URLExt.join(base, path) : path;
|
|
76
|
-
const links = this._links;
|
|
77
|
-
return new Promise((resolve, reject) => {
|
|
78
|
-
const link = document.createElement('link');
|
|
79
|
-
link.setAttribute('rel', 'stylesheet');
|
|
80
|
-
link.setAttribute('type', 'text/css');
|
|
81
|
-
link.setAttribute('href', href);
|
|
82
|
-
link.addEventListener('load', () => {
|
|
83
|
-
resolve(undefined);
|
|
84
|
-
});
|
|
85
|
-
link.addEventListener('error', () => {
|
|
86
|
-
reject(`Stylesheet failed to load: ${href}`);
|
|
87
|
-
});
|
|
88
|
-
document.body.appendChild(link);
|
|
89
|
-
links.push(link);
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
/**
|
|
93
|
-
* Register a theme with the theme manager.
|
|
94
|
-
*
|
|
95
|
-
* @param theme - The theme to register.
|
|
96
|
-
*
|
|
97
|
-
* @returns A disposable that can be used to unregister the theme.
|
|
98
|
-
*/
|
|
99
|
-
register(theme) {
|
|
100
|
-
const { name } = theme;
|
|
101
|
-
const themes = this._themes;
|
|
102
|
-
if (themes[name]) {
|
|
103
|
-
throw new Error(`Theme already registered for ${name}`);
|
|
104
|
-
}
|
|
105
|
-
themes[name] = theme;
|
|
106
|
-
return new disposable_1.DisposableDelegate(() => {
|
|
107
|
-
delete themes[name];
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
/**
|
|
111
|
-
* Set the current theme.
|
|
112
|
-
*/
|
|
113
|
-
setTheme(name) {
|
|
114
|
-
return this._settings.set('theme', name);
|
|
115
|
-
}
|
|
116
|
-
/**
|
|
117
|
-
* Test whether a given theme is light.
|
|
118
|
-
*/
|
|
119
|
-
isLight(name) {
|
|
120
|
-
return this._themes[name].isLight;
|
|
121
|
-
}
|
|
122
|
-
/**
|
|
123
|
-
* Handle the current settings.
|
|
124
|
-
*/
|
|
125
|
-
_loadSettings() {
|
|
126
|
-
const outstanding = this._outstanding;
|
|
127
|
-
const pending = this._pending;
|
|
128
|
-
const requests = this._requests;
|
|
129
|
-
// If another request is pending, cancel it.
|
|
130
|
-
if (pending) {
|
|
131
|
-
window.clearTimeout(pending);
|
|
132
|
-
this._pending = 0;
|
|
133
|
-
}
|
|
134
|
-
const settings = this._settings;
|
|
135
|
-
const themes = this._themes;
|
|
136
|
-
const theme = settings.composite['theme'];
|
|
137
|
-
// If another promise is outstanding, wait until it finishes before
|
|
138
|
-
// attempting to load the settings. Because outstanding promises cannot
|
|
139
|
-
// be aborted, the order in which they occur must be enforced.
|
|
140
|
-
if (outstanding) {
|
|
141
|
-
outstanding
|
|
142
|
-
.then(() => {
|
|
143
|
-
this._loadSettings();
|
|
144
|
-
})
|
|
145
|
-
.catch(() => {
|
|
146
|
-
this._loadSettings();
|
|
147
|
-
});
|
|
148
|
-
this._outstanding = null;
|
|
149
|
-
return;
|
|
150
|
-
}
|
|
151
|
-
// Increment the request counter.
|
|
152
|
-
requests[theme] = requests[theme] ? requests[theme] + 1 : 1;
|
|
153
|
-
// If the theme exists, load it right away.
|
|
154
|
-
if (themes[theme]) {
|
|
155
|
-
this._outstanding = this._loadTheme(theme);
|
|
156
|
-
delete requests[theme];
|
|
157
|
-
return;
|
|
158
|
-
}
|
|
159
|
-
// If the request has taken too long, give up.
|
|
160
|
-
if (requests[theme] > REQUEST_THRESHOLD) {
|
|
161
|
-
const fallback = settings.default('theme');
|
|
162
|
-
// Stop tracking the requests for this theme.
|
|
163
|
-
delete requests[theme];
|
|
164
|
-
if (!themes[fallback]) {
|
|
165
|
-
this._onError(`Neither theme ${theme} nor default ${fallback} loaded.`);
|
|
166
|
-
return;
|
|
167
|
-
}
|
|
168
|
-
console.warn(`Could not load theme ${theme}, using default ${fallback}.`);
|
|
169
|
-
this._outstanding = this._loadTheme(fallback);
|
|
170
|
-
return;
|
|
171
|
-
}
|
|
172
|
-
// If the theme does not yet exist, attempt to wait for it.
|
|
173
|
-
this._pending = window.setTimeout(() => {
|
|
174
|
-
this._loadSettings();
|
|
175
|
-
}, REQUEST_INTERVAL);
|
|
176
|
-
}
|
|
177
|
-
/**
|
|
178
|
-
* Load the theme.
|
|
179
|
-
*
|
|
180
|
-
* #### Notes
|
|
181
|
-
* This method assumes that the `theme` exists.
|
|
182
|
-
*/
|
|
183
|
-
_loadTheme(theme) {
|
|
184
|
-
const current = this._current;
|
|
185
|
-
const links = this._links;
|
|
186
|
-
const themes = this._themes;
|
|
187
|
-
const splash = this._splash.show(themes[theme].isLight);
|
|
188
|
-
// Unload any CSS files that have been loaded.
|
|
189
|
-
links.forEach(link => {
|
|
190
|
-
if (link.parentElement) {
|
|
191
|
-
link.parentElement.removeChild(link);
|
|
192
|
-
}
|
|
193
|
-
});
|
|
194
|
-
links.length = 0;
|
|
195
|
-
// Unload the previously loaded theme.
|
|
196
|
-
const old = current ? themes[current].unload() : Promise.resolve();
|
|
197
|
-
return Promise.all([old, themes[theme].load()])
|
|
198
|
-
.then(() => {
|
|
199
|
-
this._current = theme;
|
|
200
|
-
Private.fitAll(this._host);
|
|
201
|
-
splash.dispose();
|
|
202
|
-
this._themeChanged.emit({
|
|
203
|
-
name: 'theme',
|
|
204
|
-
oldValue: current,
|
|
205
|
-
newValue: theme
|
|
206
|
-
});
|
|
207
|
-
})
|
|
208
|
-
.catch(reason => {
|
|
209
|
-
this._onError(reason);
|
|
210
|
-
splash.dispose();
|
|
211
|
-
});
|
|
212
|
-
}
|
|
213
|
-
/**
|
|
214
|
-
* Handle a theme error.
|
|
215
|
-
*/
|
|
216
|
-
_onError(reason) {
|
|
217
|
-
dialog_1.showDialog({
|
|
218
|
-
title: 'Error Loading Theme',
|
|
219
|
-
body: String(reason),
|
|
220
|
-
buttons: [dialog_1.Dialog.okButton({ label: 'OK' })]
|
|
221
|
-
});
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
exports.ThemeManager = ThemeManager;
|
|
225
|
-
/**
|
|
226
|
-
* A namespace for module private data.
|
|
227
|
-
*/
|
|
228
|
-
var Private;
|
|
229
|
-
(function (Private) {
|
|
230
|
-
/**
|
|
231
|
-
* Fit a widget and all of its children, recursively.
|
|
232
|
-
*/
|
|
233
|
-
function fitAll(widget) {
|
|
234
|
-
algorithm_1.each(widget.children(), fitAll);
|
|
235
|
-
widget.fit();
|
|
236
|
-
}
|
|
237
|
-
Private.fitAll = fitAll;
|
|
238
|
-
})(Private || (Private = {}));
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Jupyter Development Team.
|
|
3
|
+
// Distributed under the terms of the Modified BSD License.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
const coreutils_1 = require("@jupyterlab/coreutils");
|
|
6
|
+
const algorithm_1 = require("@phosphor/algorithm");
|
|
7
|
+
const coreutils_2 = require("@phosphor/coreutils");
|
|
8
|
+
const disposable_1 = require("@phosphor/disposable");
|
|
9
|
+
const signaling_1 = require("@phosphor/signaling");
|
|
10
|
+
const dialog_1 = require("./dialog");
|
|
11
|
+
/* tslint:disable */
|
|
12
|
+
/**
|
|
13
|
+
* The theme manager token.
|
|
14
|
+
*/
|
|
15
|
+
exports.IThemeManager = new coreutils_2.Token('@jupyterlab/apputils:IThemeManager');
|
|
16
|
+
/**
|
|
17
|
+
* The number of milliseconds between theme loading attempts.
|
|
18
|
+
*/
|
|
19
|
+
const REQUEST_INTERVAL = 75;
|
|
20
|
+
/**
|
|
21
|
+
* The number of times to attempt to load a theme before giving up.
|
|
22
|
+
*/
|
|
23
|
+
const REQUEST_THRESHOLD = 20;
|
|
24
|
+
/**
|
|
25
|
+
* A class that provides theme management.
|
|
26
|
+
*/
|
|
27
|
+
class ThemeManager {
|
|
28
|
+
/**
|
|
29
|
+
* Construct a new theme manager.
|
|
30
|
+
*/
|
|
31
|
+
constructor(options) {
|
|
32
|
+
this._current = null;
|
|
33
|
+
this._links = [];
|
|
34
|
+
this._outstanding = null;
|
|
35
|
+
this._pending = 0;
|
|
36
|
+
this._requests = {};
|
|
37
|
+
this._themes = {};
|
|
38
|
+
this._themeChanged = new signaling_1.Signal(this);
|
|
39
|
+
const { host, key, splash, url } = options;
|
|
40
|
+
const registry = options.settings;
|
|
41
|
+
this._base = url;
|
|
42
|
+
this._host = host;
|
|
43
|
+
this._splash = splash;
|
|
44
|
+
registry.load(key).then(settings => {
|
|
45
|
+
this._settings = settings;
|
|
46
|
+
this._settings.changed.connect(this._loadSettings, this);
|
|
47
|
+
this._loadSettings();
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Get the name of the current theme.
|
|
52
|
+
*/
|
|
53
|
+
get theme() {
|
|
54
|
+
return this._current;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* The names of the registered themes.
|
|
58
|
+
*/
|
|
59
|
+
get themes() {
|
|
60
|
+
return Object.keys(this._themes);
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* A signal fired when the application theme changes.
|
|
64
|
+
*/
|
|
65
|
+
get themeChanged() {
|
|
66
|
+
return this._themeChanged;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Load a theme CSS file by path.
|
|
70
|
+
*
|
|
71
|
+
* @param path - The path of the file to load.
|
|
72
|
+
*/
|
|
73
|
+
loadCSS(path) {
|
|
74
|
+
const base = this._base;
|
|
75
|
+
const href = coreutils_1.URLExt.isLocal(path) ? coreutils_1.URLExt.join(base, path) : path;
|
|
76
|
+
const links = this._links;
|
|
77
|
+
return new Promise((resolve, reject) => {
|
|
78
|
+
const link = document.createElement('link');
|
|
79
|
+
link.setAttribute('rel', 'stylesheet');
|
|
80
|
+
link.setAttribute('type', 'text/css');
|
|
81
|
+
link.setAttribute('href', href);
|
|
82
|
+
link.addEventListener('load', () => {
|
|
83
|
+
resolve(undefined);
|
|
84
|
+
});
|
|
85
|
+
link.addEventListener('error', () => {
|
|
86
|
+
reject(`Stylesheet failed to load: ${href}`);
|
|
87
|
+
});
|
|
88
|
+
document.body.appendChild(link);
|
|
89
|
+
links.push(link);
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Register a theme with the theme manager.
|
|
94
|
+
*
|
|
95
|
+
* @param theme - The theme to register.
|
|
96
|
+
*
|
|
97
|
+
* @returns A disposable that can be used to unregister the theme.
|
|
98
|
+
*/
|
|
99
|
+
register(theme) {
|
|
100
|
+
const { name } = theme;
|
|
101
|
+
const themes = this._themes;
|
|
102
|
+
if (themes[name]) {
|
|
103
|
+
throw new Error(`Theme already registered for ${name}`);
|
|
104
|
+
}
|
|
105
|
+
themes[name] = theme;
|
|
106
|
+
return new disposable_1.DisposableDelegate(() => {
|
|
107
|
+
delete themes[name];
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Set the current theme.
|
|
112
|
+
*/
|
|
113
|
+
setTheme(name) {
|
|
114
|
+
return this._settings.set('theme', name);
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Test whether a given theme is light.
|
|
118
|
+
*/
|
|
119
|
+
isLight(name) {
|
|
120
|
+
return this._themes[name].isLight;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Handle the current settings.
|
|
124
|
+
*/
|
|
125
|
+
_loadSettings() {
|
|
126
|
+
const outstanding = this._outstanding;
|
|
127
|
+
const pending = this._pending;
|
|
128
|
+
const requests = this._requests;
|
|
129
|
+
// If another request is pending, cancel it.
|
|
130
|
+
if (pending) {
|
|
131
|
+
window.clearTimeout(pending);
|
|
132
|
+
this._pending = 0;
|
|
133
|
+
}
|
|
134
|
+
const settings = this._settings;
|
|
135
|
+
const themes = this._themes;
|
|
136
|
+
const theme = settings.composite['theme'];
|
|
137
|
+
// If another promise is outstanding, wait until it finishes before
|
|
138
|
+
// attempting to load the settings. Because outstanding promises cannot
|
|
139
|
+
// be aborted, the order in which they occur must be enforced.
|
|
140
|
+
if (outstanding) {
|
|
141
|
+
outstanding
|
|
142
|
+
.then(() => {
|
|
143
|
+
this._loadSettings();
|
|
144
|
+
})
|
|
145
|
+
.catch(() => {
|
|
146
|
+
this._loadSettings();
|
|
147
|
+
});
|
|
148
|
+
this._outstanding = null;
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
// Increment the request counter.
|
|
152
|
+
requests[theme] = requests[theme] ? requests[theme] + 1 : 1;
|
|
153
|
+
// If the theme exists, load it right away.
|
|
154
|
+
if (themes[theme]) {
|
|
155
|
+
this._outstanding = this._loadTheme(theme);
|
|
156
|
+
delete requests[theme];
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
// If the request has taken too long, give up.
|
|
160
|
+
if (requests[theme] > REQUEST_THRESHOLD) {
|
|
161
|
+
const fallback = settings.default('theme');
|
|
162
|
+
// Stop tracking the requests for this theme.
|
|
163
|
+
delete requests[theme];
|
|
164
|
+
if (!themes[fallback]) {
|
|
165
|
+
this._onError(`Neither theme ${theme} nor default ${fallback} loaded.`);
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
168
|
+
console.warn(`Could not load theme ${theme}, using default ${fallback}.`);
|
|
169
|
+
this._outstanding = this._loadTheme(fallback);
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
172
|
+
// If the theme does not yet exist, attempt to wait for it.
|
|
173
|
+
this._pending = window.setTimeout(() => {
|
|
174
|
+
this._loadSettings();
|
|
175
|
+
}, REQUEST_INTERVAL);
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Load the theme.
|
|
179
|
+
*
|
|
180
|
+
* #### Notes
|
|
181
|
+
* This method assumes that the `theme` exists.
|
|
182
|
+
*/
|
|
183
|
+
_loadTheme(theme) {
|
|
184
|
+
const current = this._current;
|
|
185
|
+
const links = this._links;
|
|
186
|
+
const themes = this._themes;
|
|
187
|
+
const splash = this._splash.show(themes[theme].isLight);
|
|
188
|
+
// Unload any CSS files that have been loaded.
|
|
189
|
+
links.forEach(link => {
|
|
190
|
+
if (link.parentElement) {
|
|
191
|
+
link.parentElement.removeChild(link);
|
|
192
|
+
}
|
|
193
|
+
});
|
|
194
|
+
links.length = 0;
|
|
195
|
+
// Unload the previously loaded theme.
|
|
196
|
+
const old = current ? themes[current].unload() : Promise.resolve();
|
|
197
|
+
return Promise.all([old, themes[theme].load()])
|
|
198
|
+
.then(() => {
|
|
199
|
+
this._current = theme;
|
|
200
|
+
Private.fitAll(this._host);
|
|
201
|
+
splash.dispose();
|
|
202
|
+
this._themeChanged.emit({
|
|
203
|
+
name: 'theme',
|
|
204
|
+
oldValue: current,
|
|
205
|
+
newValue: theme
|
|
206
|
+
});
|
|
207
|
+
})
|
|
208
|
+
.catch(reason => {
|
|
209
|
+
this._onError(reason);
|
|
210
|
+
splash.dispose();
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* Handle a theme error.
|
|
215
|
+
*/
|
|
216
|
+
_onError(reason) {
|
|
217
|
+
dialog_1.showDialog({
|
|
218
|
+
title: 'Error Loading Theme',
|
|
219
|
+
body: String(reason),
|
|
220
|
+
buttons: [dialog_1.Dialog.okButton({ label: 'OK' })]
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
exports.ThemeManager = ThemeManager;
|
|
225
|
+
/**
|
|
226
|
+
* A namespace for module private data.
|
|
227
|
+
*/
|
|
228
|
+
var Private;
|
|
229
|
+
(function (Private) {
|
|
230
|
+
/**
|
|
231
|
+
* Fit a widget and all of its children, recursively.
|
|
232
|
+
*/
|
|
233
|
+
function fitAll(widget) {
|
|
234
|
+
algorithm_1.each(widget.children(), fitAll);
|
|
235
|
+
widget.fit();
|
|
236
|
+
}
|
|
237
|
+
Private.fitAll = fitAll;
|
|
238
|
+
})(Private || (Private = {}));
|